|
|
|||||||||||||||||||||
| 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.DoubleDoublePair
de.lmu.ifi.dbs.elki.math.DoubleMinMax
public class DoubleMinMax
Class to find the minimum and maximum double values in data.
| Field Summary |
|---|
| Fields inherited from class de.lmu.ifi.dbs.elki.utilities.pairs.DoubleDoublePair |
|---|
BYFIRST_COMPARATOR, BYSECOND_COMPARATOR, first, second, SWAPPED_COMPARATOR |
| Constructor Summary | |
|---|---|
DoubleMinMax()
Constructor without starting values. |
|
DoubleMinMax(double min,
double max)
Constructor with predefined minimum and maximum values. |
|
| Method Summary | |
|---|---|
double[] |
asArray()
Return minimum and maximum as array. |
double |
getDiff()
Return the difference between minimum and maximum. |
double |
getMax()
Get the current maximum. |
double |
getMin()
Get the current minimum. |
boolean |
isValid()
Test if we have seen any data (and thus have a useful minimum and maximum). |
static DoubleMinMax[] |
newArray(int size)
Generate a new array of initialized DoubleMinMax objects (with default constructor) |
void |
put(double data)
Process a single double value. |
void |
put(double[] data)
Process a whole array of double values. |
void |
put(Double[] data)
Process a whole array of double values. |
void |
put(Iterable<Double> data)
Process a whole collection of double values. |
void |
put(SortedSet<Double> data)
Process a whole collection of double values. |
| Methods inherited from class de.lmu.ifi.dbs.elki.utilities.pairs.DoubleDoublePair |
|---|
compareSwappedTo, compareTo, equals, getFirst, getSecond, hashCode, setFirst, setSecond |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DoubleMinMax()
Double.POSITIVE_INFINITY.
The maximum will be initialized to Double.NEGATIVE_INFINITY.
So that the first data added will replace both.
public DoubleMinMax(double min,
double max)
min - Minimum valuemax - Maximum value| Method Detail |
|---|
public void put(double data)
data - New valuepublic void put(double[] data)
data - Data to processpublic void put(Double[] data)
data - Data to processpublic void put(Iterable<Double> data)
data - Data to processpublic void put(SortedSet<Double> data)
data - Data to processpublic double getMin()
public double getMax()
public double getDiff()
public boolean isValid()
true iff min <= max.public double[] asArray()
public static DoubleMinMax[] newArray(int size)
size - Array size
|
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||