Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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

    java.lang.Object
      org.apache.commons.math.stat.descriptive.SummaryStatistics
          org.apache.commons.math.stat.descriptive.SummaryStatisticsImpl

All Implemented Interfaces:
  Serializable, StatisticalSummary

public class SummaryStatisticsImpl
extends SummaryStatistics
implements Serializable

Provides a default `SummaryStatistics` implementation.

Version:
  $Revision: 348519 $ $Date: 2005-11-23 12:12:18 -0700 (Wed, 23 Nov 2005) $
See Also:
  Serialized Form

Field Summary
`protected GeometricMean` | `geoMean` geoMean of values that have been added
`protected Max` | `max` max of values that have been added
`protected Mean` | `mean` mean of values that have been added
`protected Min` | `min` min of values that have been added
`protected long` | `n` count of values that have been added
`protected SecondMoment` | `secondMoment` SecondMoment is used to compute the mean and variance
`protected Sum` | `sum` sum of values that have been added
`protected SumOfLogs` | `sumLog` sumLog of values that have been added
`protected SumOfSquares` | `sumsq` sum of the square of each value that has been added
`protected Variance` | `variance` variance of values that have been added

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.
`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
`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

Field Detail

### n

    protected long n

  count of values that have been added

### secondMoment

    protected SecondMoment secondMoment

  SecondMoment is used to compute the mean and variance

### sum

    protected Sum sum

  sum of values that have been added

### sumsq

    protected SumOfSquares sumsq

  sum of the square of each value that has been added

### min

    protected Min min

  min of values that have been added

### max

    protected Max max

  max of values that have been added

### sumLog

    protected SumOfLogs sumLog

  sumLog of values that have been added

### geoMean

    protected GeometricMean geoMean

  geoMean of values that have been added

### mean

    protected Mean mean

  mean of values that have been added

### variance

    protected Variance variance

  variance of values that have been added

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 String toString()

  Generates a text report displaying summary statistics from values that have been added.

  Returns:
    String with line feeds displaying statistics

### clear

    public void clear()

  Resets all statistics and storage

  Specified by:
    `clear` in class `SummaryStatistics`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2003-2005 The Apache Software Foundation. All Rights Reserved.