fr.ocelet.runtime.affectoperators
Class Mean<T extends java.lang.Number>

Package class diagram package Mean
java.lang.Object
  extended by fr.ocelet.runtime.affectoperators.Mean<T>
All Implemented Interfaces:
AffectOperator<T>

public class Mean<T extends java.lang.Number>
extends java.lang.Object
implements AffectOperator<T>

Returns the mean of all the values contained in the argument vector. This AffectOperator should only be used with number properties.

See Also:
AffectOperator

Constructor Summary
Mean()
           
 
Method Summary
 T compute(java.util.ArrayList<T> future)
          Computes all the candidate values and produces one unique value of the same type to be used for property affectation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Mean

public Mean()
Method Detail

compute

public T compute(java.util.ArrayList<T> future)
Computes all the candidate values and produces one unique value of the same type to be used for property affectation. In this case the mean value is returned.

Specified by:
compute in interface AffectOperator<T extends java.lang.Number>
Parameters:
future - Vector of candidate values.
Returns:
The mean of all the values contained in the argument vector.