Package org.hipparchus.stat.descriptive
Interface AggregatableStatistic<T>
-
- Type Parameters:
T
- the type of statistic
- All Known Implementing Classes:
GeometricMean
,Max
,Mean
,Min
,Product
,RandomPercentile
,SecondMoment
,StreamingStatistics
,Sum
,SumOfLogs
,SumOfSquares
,Variance
public interface AggregatableStatistic<T>
An interface for statistics that can aggregate results.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default void
aggregate(Iterable<T> others)
Aggregates the results from the provided instances into this instance.void
aggregate(T other)
Aggregates the provided instance into this instance.default void
aggregate(T... others)
Aggregates the results from the provided instances into this instance.
-
-
-
Method Detail
-
aggregate
void aggregate(T other) throws NullArgumentException
Aggregates the provided instance into this instance.This method can be used to combine statistics computed over partitions or subsamples - i.e., the value of this instance after this operation should be the same as if a single statistic would have been applied over the combined dataset.
- Parameters:
other
- the instance to aggregate into this instance- Throws:
NullArgumentException
- if the input is null
-
aggregate
default void aggregate(T... others)
Aggregates the results from the provided instances into this instance.This method can be used to combine statistics computed over partitions or subsamples - i.e., the value of this instance after this operation should be the same as if a single statistic would have been applied over the combined dataset.
- Parameters:
others
- the other instances to aggregate into this instance- Throws:
NullArgumentException
- if either others or any instance is null
-
aggregate
default void aggregate(Iterable<T> others)
Aggregates the results from the provided instances into this instance.This method can be used to combine statistics computed over partitions or subsamples - i.e., the value of this instance after this operation should be the same as if a single statistic would have been applied over the combined dataset.
- Parameters:
others
- the other instances to aggregate into this instance- Throws:
NullArgumentException
- if either others or any instance is null
-
-