TUM CCSM Commons

edu.tum.cs.commons.math
Class PairwiseAggregatorBase

java.lang.Object
  extended by edu.tum.cs.commons.math.PairwiseAggregatorBase
All Implemented Interfaces:
IAggregator
Direct Known Subclasses:
MaxAggregator, MinAggregator, SumAggregator

public abstract class PairwiseAggregatorBase
extends java.lang.Object
implements IAggregator

This is a base class for aggregators that have a defined neutral element and operate in pairwise manner.

Version:
$Rev: 28099 $
Author:
Florian Deissenboeck, $Author: hummelb $
Rating:
GREEN Hash: B262E418EFDA28F4B7634AA5FDDFD68E

Constructor Summary
PairwiseAggregatorBase()
           
 
Method Summary
 double aggregate(java.util.Collection<? extends java.lang.Number> values)
          Aggregate collection of values to one value.
protected abstract  double aggregate(double aggregate, double value)
          Calculate aggregate of two values.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface edu.tum.cs.commons.math.IAggregator
getNeutralElement
 

Constructor Detail

PairwiseAggregatorBase

public PairwiseAggregatorBase()
Method Detail

aggregate

public double aggregate(java.util.Collection<? extends java.lang.Number> values)
Aggregate collection of values to one value. Implementing classes may return non-normal numbers, e.g. Double.NaN for the median of an empty collections.

Specified by:
aggregate in interface IAggregator

aggregate

protected abstract double aggregate(double aggregate,
                                    double value)
Calculate aggregate of two values.

Parameters:
aggregate - the value that has been aggregated by previous pairwise aggregations
value - the new value

TUM CCSM Commons

TUM CCSM Commons - 2.7