|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object de.lmu.ifi.dbs.elki.utilities.pairs.Pair<T,T> de.lmu.ifi.dbs.elki.math.MinMax<T>
T
- Data typepublic class MinMax<T extends Comparable<? super T>>
Class to find the minimum and maximum double values in data.
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). |
|
static
|
newArray(int size)
New array of MinMax objects for a given type. |
|
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, newPairArray, 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()
public static <N extends Comparable<N>> MinMax<N>[] newArray(int size)
N
- Number type.size
- Size.
|
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |