org.apache.commons.math.stat.descriptive
Class SummaryStatisticsImpl

java.lang.Object
  extended by org.apache.commons.math.stat.descriptive.SummaryStatistics
      extended by org.apache.commons.math.stat.descriptive.SummaryStatisticsImpl
All Implemented Interfaces:
java.io.Serializable, StatisticalSummary

public class SummaryStatisticsImpl
extends SummaryStatistics
implements java.io.Serializable

Provides a default SummaryStatistics implementation.

See Also:
Serialized Form

Constructor Summary
SummaryStatisticsImpl()
          Construct a SummaryStatistics
 
Method Summary
 void addValue(double value)
          Add a value to the data
 void clear()
          Resets all statistics and storage
 double getGeometricMean()
          Returns the geometric mean of the values that have been added.
 double getMax()
          Returns the maximum of the values that have been added.
 double getMean()
          Returns the mean of the values that have been added.
 double getMin()
          Returns the minimum of the values that have been added.
 long getN()
          Returns the number of available values
 double getStandardDeviation()
          Returns the standard deviation of the values that have been added.
 double getSum()
          Returns the sum of the values that have been added to Univariate.
 double getSumsq()
          Returns the sum of the squares of the values that have been added.
 double getVariance()
          Returns the variance of the values that have been added.
 java.lang.String toString()
          Generates a text report displaying summary statistics from values that have been added.
 
Methods inherited from class org.apache.commons.math.stat.descriptive.SummaryStatistics
equals, getSummary, hashCode, newInstance, newInstance
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SummaryStatisticsImpl

public SummaryStatisticsImpl()
Construct a SummaryStatistics

Method Detail

addValue

public void addValue(double value)
Add a value to the data

Specified by:
addValue in class SummaryStatistics
Parameters:
value - the value to add

getN

public long getN()
Returns the number of available values

Specified by:
getN in interface StatisticalSummary
Specified by:
getN in class SummaryStatistics
Returns:
The number of available values

getSum

public double getSum()
Returns the sum of the values that have been added to Univariate.

Specified by:
getSum in interface StatisticalSummary
Specified by:
getSum in class SummaryStatistics
Returns:
The sum or Double.NaN if no values have been added

getSumsq

public double getSumsq()
Returns the sum of the squares of the values that have been added.

Double.NaN is returned if no values have been added.

Specified by:
getSumsq in class SummaryStatistics
Returns:
The sum of squares

getMean

public double getMean()
Returns the mean of the values that have been added.

Double.NaN is returned if no values have been added.

Specified by:
getMean in interface StatisticalSummary
Specified by:
getMean in class SummaryStatistics
Returns:
the mean

getStandardDeviation

public double getStandardDeviation()
Returns the standard deviation of the values that have been added.

Double.NaN is returned if no values have been added.

Specified by:
getStandardDeviation in interface StatisticalSummary
Specified by:
getStandardDeviation in class SummaryStatistics
Returns:
the standard deviation

getVariance

public double getVariance()
Returns the variance of the values that have been added.

Double.NaN is returned if no values have been added.

Specified by:
getVariance in interface StatisticalSummary
Specified by:
getVariance in class SummaryStatistics
Returns:
the variance

getMax

public double getMax()
Returns the maximum of the values that have been added.

Double.NaN is returned if no values have been added.

Specified by:
getMax in interface StatisticalSummary
Specified by:
getMax in class SummaryStatistics
Returns:
the maximum

getMin

public double getMin()
Returns the minimum of the values that have been added.

Double.NaN is returned if no values have been added.

Specified by:
getMin in interface StatisticalSummary
Specified by:
getMin in class SummaryStatistics
Returns:
the minimum

getGeometricMean

public double getGeometricMean()
Returns the geometric mean of the values that have been added.

Double.NaN is returned if no values have been added.

Specified by:
getGeometricMean in class SummaryStatistics
Returns:
the geometric mean

toString

public java.lang.String toString()
Generates a text report displaying summary statistics from values that have been added.

Overrides:
toString in class java.lang.Object
Returns:
String with line feeds displaying statistics

clear

public void clear()
Resets all statistics and storage

Specified by:
clear in class SummaryStatistics


jHepWork 1.1 (C) Chekanov