com.sun.faban.driver.util
Class PairwiseAggregator<T extends PairwiseAggregator.Aggregable<T>>
java.lang.Object
com.sun.faban.driver.util.PairwiseAggregator<T>
public class PairwiseAggregator<T extends PairwiseAggregator.Aggregable<T>>
- extends Object
The PairwiseAggregator implements the pairwise algorithm discussed by
Chan's paper at Updating Formulae and a Pairwise Algorithm for Computing Sample
Variances
- Author:
- akara
Method Summary |
T |
collectStats()
Uses the pairwise algorithm to aggregate all the metrices together. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PairwiseAggregator
public PairwiseAggregator(int nodeCount,
PairwiseAggregator.Provider<T> provider)
- Creates a PairwiseAggregator.
- Parameters:
nodeCount
- The number of objects to aggregateprovider
- The object provider for aggregation
collectStats
public T collectStats()
- Uses the pairwise algorithm to aggregate all the metrices together.
This is to minimize floating point error and get mathematically
stable results. It also minimizes memory use for a pairwise
algorithm.
- Returns:
- The aggregated metric