Class StatisticalSummaryValues
- java.lang.Object
-
- org.apache.commons.math.stat.descriptive.StatisticalSummaryValues
-
- All Implemented Interfaces:
java.io.Serializable
,StatisticalSummary
public class StatisticalSummaryValues extends java.lang.Object implements java.io.Serializable, StatisticalSummary
Value object representing the results of a univariate statistical summary.- Version:
- $Revision: 1054186 $ $Date: 2011-01-01 03:28:46 +0100 (sam. 01 janv. 2011) $
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description StatisticalSummaryValues(double mean, double variance, long n, double max, double min, double sum)
Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object object)
Returns true iffobject
is aStatisticalSummaryValues
instance and all statistics have the same values as this.double
getMax()
Returns the maximum of the available valuesdouble
getMean()
Returns the arithmetic mean of the available valuesdouble
getMin()
Returns the minimum of the available valueslong
getN()
Returns the number of available valuesdouble
getStandardDeviation()
Returns the standard deviation of the available values.double
getSum()
Returns the sum of the values that have been added to Univariate.double
getVariance()
Returns the variance of the available values.int
hashCode()
Returns hash code based on values of statisticsjava.lang.String
toString()
Generates a text report displaying values of statistics.
-
-
-
Constructor Detail
-
StatisticalSummaryValues
public StatisticalSummaryValues(double mean, double variance, long n, double max, double min, double sum)
Constructor- Parameters:
mean
- the sample meanvariance
- the sample variancen
- the number of observations in the samplemax
- the maximum valuemin
- the minimum valuesum
- the sum of the values
-
-
Method Detail
-
getMax
public double getMax()
Description copied from interface:StatisticalSummary
Returns the maximum of the available values- Specified by:
getMax
in interfaceStatisticalSummary
- Returns:
- Returns the max.
-
getMean
public double getMean()
Description copied from interface:StatisticalSummary
Returns the arithmetic mean of the available values- Specified by:
getMean
in interfaceStatisticalSummary
- Returns:
- Returns the mean.
-
getMin
public double getMin()
Description copied from interface:StatisticalSummary
Returns the minimum of the available values- Specified by:
getMin
in interfaceStatisticalSummary
- Returns:
- Returns the min.
-
getN
public long getN()
Description copied from interface:StatisticalSummary
Returns the number of available values- Specified by:
getN
in interfaceStatisticalSummary
- Returns:
- Returns the number of values.
-
getSum
public double getSum()
Description copied from interface:StatisticalSummary
Returns the sum of the values that have been added to Univariate.- Specified by:
getSum
in interfaceStatisticalSummary
- Returns:
- Returns the sum.
-
getStandardDeviation
public double getStandardDeviation()
Description copied from interface:StatisticalSummary
Returns the standard deviation of the available values.- Specified by:
getStandardDeviation
in interfaceStatisticalSummary
- Returns:
- Returns the standard deviation
-
getVariance
public double getVariance()
Description copied from interface:StatisticalSummary
Returns the variance of the available values.- Specified by:
getVariance
in interfaceStatisticalSummary
- Returns:
- Returns the variance.
-
equals
public boolean equals(java.lang.Object object)
Returns true iffobject
is aStatisticalSummaryValues
instance and all statistics have the same values as this.- Overrides:
equals
in classjava.lang.Object
- Parameters:
object
- the object to test equality against.- Returns:
- true if object equals this
-
hashCode
public int hashCode()
Returns hash code based on values of statistics- Overrides:
hashCode
in classjava.lang.Object
- Returns:
- hash code
-
toString
public java.lang.String toString()
Generates a text report displaying values of statistics. Each statistic is displayed on a separate line.- Overrides:
toString
in classjava.lang.Object
- Returns:
- String with line feeds displaying statistics
-
-