org.android.activityminer.logic.features.calculators
Class AbstractCompositeCalculator<T extends Enum<T> & Dimensions,U>

Package class diagram package AbstractCompositeCalculator
java.lang.Object
  extended by org.android.activityminer.logic.features.calculators.AbstractCalculator<T,U>
      extended by org.android.activityminer.logic.features.calculators.AbstractCompositeCalculator<T,U>
Type Parameters:
T - the enumeration type for the dimensions
U - the value type
All Implemented Interfaces:
Calculator<U>, CompositeCalculator<U>
Direct Known Subclasses:
AbstractEntropyCalculator, AbstractFFTObservationBasedCalculator, FFTCalculator, MeanCalculator, MeanCrossingRateCalculator, VarianceCalculator

public abstract class AbstractCompositeCalculator<T extends Enum<T> & Dimensions,U>
extends AbstractCalculator<T,U>
implements CompositeCalculator<U>

This is the base implementation for all calculator types.


Field Summary
private  boolean hasValue
          Flag if the calculator value is already calculated.
 
Fields inherited from class org.android.activityminer.logic.features.calculators.AbstractCalculator
dimension, value
 
Constructor Summary
AbstractCompositeCalculator(T dimension)
          Constructor
 
Method Summary
 U getValue()
          Getter for the calculator value
 void reset()
          Method to reset the calculator value.
 
Methods inherited from class org.android.activityminer.logic.features.calculators.AbstractCalculator
getDimension
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.android.activityminer.logic.features.calculators.CompositeCalculator
getCompositeValue
 
Methods inherited from interface org.android.activityminer.logic.features.calculators.Calculator
getInitialValue
 

Field Detail

hasValue

private boolean hasValue
Flag if the calculator value is already calculated.

Constructor Detail

AbstractCompositeCalculator

public AbstractCompositeCalculator(T dimension)
Constructor

Parameters:
dimension - the times series dimension to operate on
Method Detail

getValue

public final U getValue()
Description copied from interface: Calculator
Getter for the calculator value

Specified by:
getValue in interface Calculator<U>
Overrides:
getValue in class AbstractCalculator<T extends Enum<T> & Dimensions,U>
Returns:
the calculator value

reset

public final void reset()
Description copied from interface: Calculator
Method to reset the calculator value.

Specified by:
reset in interface Calculator<U>
Overrides:
reset in class AbstractCalculator<T extends Enum<T> & Dimensions,U>