Class StatisticalSummaryValues
- java.lang.Object
-
- org.apache.commons.math3.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.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description private doublemaxThe maximum valueprivate doublemeanThe sample meanprivate doubleminThe minimum valueprivate longnThe number of observations in the sampleprivate static longserialVersionUIDSerialization idprivate doublesumThe sum of the sample valuesprivate doublevarianceThe sample variance
-
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 booleanequals(java.lang.Object object)Returns true iffobjectis aStatisticalSummaryValuesinstance and all statistics have the same values as this.doublegetMax()Returns the maximum of the available valuesdoublegetMean()Returns the arithmetic mean of the available valuesdoublegetMin()Returns the minimum of the available valueslonggetN()Returns the number of available valuesdoublegetStandardDeviation()Returns the standard deviation of the available values.doublegetSum()Returns the sum of the values that have been added to Univariate.doublegetVariance()Returns the variance of the available values.inthashCode()Returns hash code based on values of statisticsjava.lang.StringtoString()Generates a text report displaying values of statistics.
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
Serialization id- See Also:
- Constant Field Values
-
mean
private final double mean
The sample mean
-
variance
private final double variance
The sample variance
-
n
private final long n
The number of observations in the sample
-
max
private final double max
The maximum value
-
min
private final double min
The minimum value
-
sum
private final double sum
The sum of the sample values
-
-
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:StatisticalSummaryReturns the maximum of the available values- Specified by:
getMaxin interfaceStatisticalSummary- Returns:
- Returns the max.
-
getMean
public double getMean()
Description copied from interface:StatisticalSummaryReturns the arithmetic mean of the available values- Specified by:
getMeanin interfaceStatisticalSummary- Returns:
- Returns the mean.
-
getMin
public double getMin()
Description copied from interface:StatisticalSummaryReturns the minimum of the available values- Specified by:
getMinin interfaceStatisticalSummary- Returns:
- Returns the min.
-
getN
public long getN()
Description copied from interface:StatisticalSummaryReturns the number of available values- Specified by:
getNin interfaceStatisticalSummary- Returns:
- Returns the number of values.
-
getSum
public double getSum()
Description copied from interface:StatisticalSummaryReturns the sum of the values that have been added to Univariate.- Specified by:
getSumin interfaceStatisticalSummary- Returns:
- Returns the sum.
-
getStandardDeviation
public double getStandardDeviation()
Description copied from interface:StatisticalSummaryReturns the standard deviation of the available values.- Specified by:
getStandardDeviationin interfaceStatisticalSummary- Returns:
- Returns the standard deviation
-
getVariance
public double getVariance()
Description copied from interface:StatisticalSummaryReturns the variance of the available values.- Specified by:
getVariancein interfaceStatisticalSummary- Returns:
- Returns the variance.
-
equals
public boolean equals(java.lang.Object object)
Returns true iffobjectis aStatisticalSummaryValuesinstance and all statistics have the same values as this.- Overrides:
equalsin 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:
hashCodein 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:
toStringin classjava.lang.Object- Returns:
- String with line feeds displaying statistics
-
-