public class Stats extends java.lang.Object implements java.io.Serializable, RevisionHandler
| Modifier and Type | Field and Description | 
|---|---|
| double | countThe number of values seen | 
| double | maxThe maximum value seen, or Double.NaN if no values seen | 
| double | meanThe mean of values at the last calculateDerived() call | 
| double | minThe minimum value seen, or Double.NaN if no values seen | 
| double | stdDevThe std deviation of values at the last calculateDerived() call | 
| double | sumThe sum of values seen | 
| double | sumSqThe sum of values squared seen | 
| Constructor and Description | 
|---|
| Stats() | 
| Modifier and Type | Method and Description | 
|---|---|
| void | add(double value)Adds a value to the observed values | 
| void | add(double value,
   double n)Adds a value that has been seen n times to the observed values | 
| void | calculateDerived()Tells the object to calculate any statistics that don't have their
 values automatically updated during add. | 
| java.lang.String | getRevision()Returns the revision string. | 
| static void | main(java.lang.String[] args)Tests the paired stats object from the command line. | 
| void | subtract(double value)Removes a value to the observed values (no checking is done
 that the value being removed was actually added). | 
| void | subtract(double value,
        double n)Subtracts a value that has been seen n times from the observed values | 
| java.lang.String | toString()Returns a string summarising the stats so far. | 
public double count
public double sum
public double sumSq
public double stdDev
public double mean
public double min
public double max
public void add(double value)
value - the observed valuepublic void add(double value,
                double n)
value - the observed valuen - the number of times to add valuepublic void subtract(double value)
value - the observed valuepublic void subtract(double value,
                     double n)
value - the observed valuen - the number of times to subtract valuepublic void calculateDerived()
public java.lang.String toString()
toString in class java.lang.Objectpublic java.lang.String getRevision()
getRevision in interface RevisionHandlerpublic static void main(java.lang.String[] args)
args - ignored.