net.sf.jagg
Class StdDevAggregator

java.lang.Object
  extended by net.sf.jagg.Aggregator
      extended by net.sf.jagg.AbstractVarianceAggregator
          extended by net.sf.jagg.StdDevAggregator

public class StdDevAggregator
extends AbstractVarianceAggregator

This class represents the "sample standard deviation" aggregator over numeric values.

Since:
0.1.0
Author:
Randy Gettman

Field Summary
 
Fields inherited from class net.sf.jagg.AbstractVarianceAggregator
myCount, mySum, myVarNumerator
 
Fields inherited from class net.sf.jagg.Aggregator
PROP_SELF
 
Constructor Summary
StdDevAggregator(java.lang.String property)
          Constructs an StdDevAggregator that operates on the specified property.
 
Method Summary
 StdDevAggregator replicate()
          Returns an uninitialized copy of this Aggregator object, with the same property(ies) to analyze.
 java.lang.Double terminate()
          Return the sample standard deviation by taking the square root of the sample variance.
 DoubleDouble terminateDoubleDouble()
          Return the result as a DoubleDouble.
 
Methods inherited from class net.sf.jagg.AbstractVarianceAggregator
init, iterate, merge
 
Methods inherited from class net.sf.jagg.Aggregator
equals, getAggregator, getAggregator, getProperty, getValueFromProperty, hashCode, isInUse, setInUse, setProperty, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

StdDevAggregator

public StdDevAggregator(java.lang.String property)
Constructs an StdDevAggregator that operates on the specified property.

Parameters:
property - Calculate the standard deviation of this property's values.
Method Detail

replicate

public StdDevAggregator replicate()
Returns an uninitialized copy of this Aggregator object, with the same property(ies) to analyze.

Specified by:
replicate in class Aggregator
Returns:
An uninitialized copy of this Aggregator object.

terminate

public java.lang.Double terminate()
Return the sample standard deviation by taking the square root of the sample variance.

Specified by:
terminate in class Aggregator
Returns:
The sample standard deviation as a Double. Returns NaN if no items have been accumulated, or 0 if exactly one value has been accumulated.

terminateDoubleDouble

public DoubleDouble terminateDoubleDouble()
Return the result as a DoubleDouble. This is used mainly when other Aggregators that use this result must maintain a high precision.

Specified by:
terminateDoubleDouble in class AbstractVarianceAggregator
Returns:
The sample standard deviation as a DoubleDouble, NaN if no items have been accumulated, or 0 if exactly one value has been accumulated.
Since:
0.4.0
See Also:
DoubleDouble


Copyright © 2010-2013 jAgg Team. All Rights Reserved.