## org.ascape.util.data
Class StatCollectorCSAMMVar

    java.lang.Object
      org.ascape.util.data.StatCollector
          org.ascape.util.data.StatCollectorCSA
              org.ascape.util.data.StatCollectorCSAMM
                  org.ascape.util.data.StatCollectorCSAMMVar

All Implemented Interfaces:
  java.io.Serializable, java.lang.Comparable, DataPoint, HasName

Direct Known Subclasses:
  StatCollectorCondCSAMMVar

    public class StatCollectorCSAMMVar

extends StatCollectorCSAMM

Stores aggregate data for values obtained for a statistic, including statistical variance. See StatCollectorCSA for an example.

Since:
  1.0
Version:
  1.2
Author:
  Miles Parker
See Also:
  `StatCollector`, `StatCollectorCond`, Serialized Form

Field Summary

Fields inherited from class org.ascape.util.data.StatCollectorCSA
`sum`

Fields inherited from class org.ascape.util.data.StatCollector
`allMeasureNames, allMeasureNamesShort, autoCollect, COLLECTING, count, name, NOT_COLLECTING, SET_BY_DATAGROUP`

Constructor Summary
`StatCollectorCSAMMVar()` Constructs a new StatCollectorCSAMMVar.
`StatCollectorCSAMMVar(java.lang.String name)` Constructs a new StatCollectorCSAMMVar.
`StatCollectorCSAMMVar(java.lang.String name, boolean autoCollect)` Constructs a new StatCollectorCSAMMVar.

Method Summary
`void` `addValue(double value)` Add the value, incrementing count, adding sum, checking for minimum and maximum, and adding to a record of data used for calculating variance and standard deviation.
`void` `clear()` Sets all values statistics to base values (0 or max.) Clears variance vector.
`double` `getStDev()` Returns the standard deviation of the current data.
`double` `getVar()` Returns the statistical variance of the current data.

Methods inherited from class org.ascape.util.data.StatCollectorCSAMM
`getMax, getMin`

Methods inherited from class org.ascape.util.data.StatCollectorCSA
`getAvg, getSum, getTotal`

Methods inherited from class org.ascape.util.data.StatCollector

`addValueFor, calculateCollection, calculateIterator, calculateValue, compareTo, createDataSeries, getAllDataSeries, getAllMeasureNames, getAllMeasureNamesShort, getCollectingLongitudinalDataMode, getCount, getDataGroup, getDataSeries, getName, getValue, isAutoCollect, isCalculated, isCollectingLongitudinalData, isPhase2, setAutoCollect, setCollectingLongitudinalDataMode, setDataGroup, setName, toString`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### StatCollectorCSAMMVar

    public StatCollectorCSAMMVar()

  Constructs a new StatCollectorCSAMMVar.

### StatCollectorCSAMMVar

    public StatCollectorCSAMMVar(java.lang.String name,
                                 boolean autoCollect)

  Constructs a new StatCollectorCSAMMVar.

  Parameters:
    `name` - the name of the stat collector.
    `autoCollect` - should the stat be collected automatically?

### StatCollectorCSAMMVar

    public StatCollectorCSAMMVar(java.lang.String name)

  Constructs a new StatCollectorCSAMMVar. (Automatic by default.)

  Parameters:
    `name` - the name of the stat collector.

Method Detail

### clear

    public void clear()

  Sets all values statistics to base values (0 or max.) Clears variance vector.

  Overrides:
    `clear` in class `StatCollectorCSAMM`

### addValue

    public void addValue(double value)

  Add the value, incrementing count, adding sum, checking for minimum and maximum, and adding to a record of data used for calculating variance and standard deviation.

  Overrides:
    `addValue` in class `StatCollectorCSAMM`

### getVar

    public double getVar()

  Returns the statistical variance of the current data.

### getStDev

    public double getStDev()

  Returns the standard deviation of the current data.