Class AggregateSummaryStatistics.AggregatingSummaryStatistics
- java.lang.Object
-
- org.apache.commons.math3.stat.descriptive.SummaryStatistics
-
- org.apache.commons.math3.stat.descriptive.AggregateSummaryStatistics.AggregatingSummaryStatistics
-
- All Implemented Interfaces:
java.io.Serializable
,StatisticalSummary
- Enclosing class:
- AggregateSummaryStatistics
private static class AggregateSummaryStatistics.AggregatingSummaryStatistics extends SummaryStatistics
A SummaryStatistics that also forwards all values added to it to a secondSummaryStatistics
for aggregation.- Since:
- 2.0
-
-
Field Summary
Fields Modifier and Type Field Description private SummaryStatistics
aggregateStatistics
An additional SummaryStatistics into which values added to these statistics (and possibly others) are aggregatedprivate static long
serialVersionUID
The serialization version of this class
-
Constructor Summary
Constructors Constructor Description AggregatingSummaryStatistics(SummaryStatistics aggregateStatistics)
Initializes a new AggregatingSummaryStatistics with the specified aggregate statistics object
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addValue(double value)
Add a value to the databoolean
equals(java.lang.Object object)
Returns true iffobject
is aSummaryStatistics
instance and all statistics have the same values as this.int
hashCode()
Returns hash code based on values of statistics-
Methods inherited from class org.apache.commons.math3.stat.descriptive.SummaryStatistics
clear, copy, copy, getGeoMeanImpl, getGeometricMean, getMax, getMaxImpl, getMean, getMeanImpl, getMin, getMinImpl, getN, getPopulationVariance, getQuadraticMean, getSecondMoment, getStandardDeviation, getSum, getSumImpl, getSumLogImpl, getSummary, getSumOfLogs, getSumsq, getSumsqImpl, getVariance, getVarianceImpl, setGeoMeanImpl, setMaxImpl, setMeanImpl, setMinImpl, setSumImpl, setSumLogImpl, setSumsqImpl, setVarianceImpl, toString
-
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
The serialization version of this class- See Also:
- Constant Field Values
-
aggregateStatistics
private final SummaryStatistics aggregateStatistics
An additional SummaryStatistics into which values added to these statistics (and possibly others) are aggregated
-
-
Constructor Detail
-
AggregatingSummaryStatistics
AggregatingSummaryStatistics(SummaryStatistics aggregateStatistics)
Initializes a new AggregatingSummaryStatistics with the specified aggregate statistics object- Parameters:
aggregateStatistics
- aSummaryStatistics
into which values added to this statistics object should be aggregated
-
-
Method Detail
-
addValue
public void addValue(double value)
Add a value to the data. This version adds the provided value to the configured aggregate after adding it to these statistics.- Overrides:
addValue
in classSummaryStatistics
- Parameters:
value
- the value to add- See Also:
SummaryStatistics.addValue(double)
-
equals
public boolean equals(java.lang.Object object)
Returns true iffobject
is aSummaryStatistics
instance and all statistics have the same values as this.- Overrides:
equals
in classSummaryStatistics
- 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 classSummaryStatistics
- Returns:
- hash code
-
-