An aggregator for {@code SummaryStatistics} from several data sets ordata set partitions. In its simplest usage mode, the client creates an instance via the zero-argument constructor, then uses {@link #createContributingStatistics()} to obtain a {@code SummaryStatistics}for each individual data set / partition. The per-set statistics objects are used as normal, and at any time the aggregate statistics for all the contributors can be obtained from this object.
Clients with specialized requirements can use alternative constructors to control the statistics implementations and initial values used by the contributing and the internal aggregate {@code SummaryStatistics} objects.
A static {@link #aggregate(Collection)} method is also included that computesaggregate statistics directly from a Collection of SummaryStatistics instances.
When {@link #createContributingStatistics()} is used to create SummaryStatisticsinstances to be aggregated concurrently, the created instances' {@link SummaryStatistics#addValue(double)} methods must synchronize on the aggregatinginstance maintained by this class. In multithreaded environments, if the functionality provided by {@link #aggregate(Collection)} is adequate, that method should be usedto avoid unnecessary computation and synchronization delays.
@since 2.0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|