gov.nasa.alsUtility
Class WeightedStatistics
java.lang.Object
gov.nasa.alsUtility.WeightedStatistics
- All Implemented Interfaces:
- java.io.Serializable
- public class WeightedStatistics
- extends java.lang.Object
- implements java.io.Serializable
holds doubles (called "datums") from a statistical sample and does simple statistics on them
- See Also:
- Serialized Form
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
sum
protected double sum
sumSquares
protected double sumSquares
weightSum
protected double weightSum
count
protected int count
countOfNonNormalNumbers
protected int countOfNonNormalNumbers
min
protected double min
max
protected double max
WeightedStatistics
public WeightedStatistics()
addDatum
public void addDatum(double value)
- add datum d to the sample
addDatum
public void addDatum(double value,
double weight)
addData
public void addData(double[] values)
addData
public void addData(double[] values,
double[] weights)
statisticsString
public java.lang.String statisticsString()
- Returns:
- statistics in tab separated format
getWeightedSum
public double getWeightedSum()
getSumOfWeights
public double getSumOfWeights()
getMean
public double getMean()
getMin
public double getMin()
- of values with non-zero weight
getMax
public double getMax()
- of values with non-zero weight
getSpread
public double getSpread()
getRMS
public double getRMS()
getN
public int getN()
- Returns:
- number of entries with non-zero weight
getBadNumberCount
public int getBadNumberCount()