com.rapidminer.tools.math.function.aggregation
Interface AggregationFunction

All Known Implementing Classes:
AbstractAggregationFunction, AverageFunction, CountFunction, MaxFunction, MedianFunction, MinFunction, ModeFunction, StandardDeviationFunction, SumFunction, VarianceFunction

public interface AggregationFunction

An aggregation function which calculates the value for a given value array.

Author:
Tobias Malbrecht, Ingo Mierswa

Method Summary
 double calculate(double[] values)
          Calculate function value for given values.
 double calculate(double[] values, double[] weights)
          Calculate function value for given values and weights.
 java.lang.String getName()
          Returns the name of the aggregation function.
 double getValue()
          Returns the function value.
 boolean supportsAttribute(Attribute attribute)
          Returns whether this function supports the given attribute.
 void update(double value)
          Consider a new value by updating counters.
 void update(double value, double weight)
          Consider a new value and a corresponding weight by updating counters.
 

Method Detail

getName

java.lang.String getName()
Returns the name of the aggregation function.


update

void update(double value,
            double weight)
Consider a new value and a corresponding weight by updating counters.


update

void update(double value)
Consider a new value by updating counters.


getValue

double getValue()
Returns the function value.


calculate

double calculate(double[] values)
Calculate function value for given values. ATTENTION: counters might be reset and hence value history might be lost!


calculate

double calculate(double[] values,
                 double[] weights)
Calculate function value for given values and weights. ATTENTION: counters might be reset and hence value history might be lost!


supportsAttribute

boolean supportsAttribute(Attribute attribute)
Returns whether this function supports the given attribute.



Copyright © 2001-2009 by Rapid-I