|
|
|||||||||||||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.lmu.ifi.dbs.elki.utilities.pairs.Pair<T,T>
de.lmu.ifi.dbs.elki.math.MinMax<T>
public class MinMax<T extends Comparable<? super T>>
Class to find the minimum and maximum double values in data.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class de.lmu.ifi.dbs.elki.utilities.pairs.Pair |
---|
Pair.Compare<FIRST,SECOND>, Pair.CompareByFirst<FIRST,SECOND>, Pair.CompareBySecond<FIRST,SECOND>, Pair.CompareSwapped<FIRST,SECOND> |
Field Summary |
---|
Fields inherited from class de.lmu.ifi.dbs.elki.utilities.pairs.Pair |
---|
first, second |
Constructor Summary | |
---|---|
MinMax()
Constructor without starting values. |
|
MinMax(T min,
T max)
Constructor with predefined minimum and maximum values. |
Method Summary | |
---|---|
Object[] |
asArray()
Return minimum and maximum as array. |
T |
getMax()
Get the current maximum. |
T |
getMin()
Get the current minimum. |
boolean |
isValid()
Test if we have seen any data (and thus have a useful minimum and maximum). |
void |
put(Iterable<T> data)
Process a whole collection of values. |
void |
put(SortedSet<T> data)
Process a whole collection of values. |
void |
put(T data)
Process a single value. |
void |
put(T[] data)
Process a whole array of values. |
Methods inherited from class de.lmu.ifi.dbs.elki.utilities.pairs.Pair |
---|
equals, getFirst, getSecond, hashCode, newArray, setFirst, setSecond, toString |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public MinMax()
null
.
The maximum will be initialized to null
.
public MinMax(T min, T max)
min
- Minimum valuemax
- Maximum valueMethod Detail |
---|
public void put(T data)
data
- New valuepublic void put(T[] data)
data
- Data to processpublic void put(Iterable<T> data)
data
- Data to processpublic void put(SortedSet<T> data)
data
- Data to processpublic T getMin()
public T getMax()
public boolean isValid()
true
iff min != null and max != null.public Object[] asArray()
|
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |