org.android.activityminer.logic.features.calculators
Class AbstractCompositeCalculator<T extends Enum<T> & Dimensions,U>
java.lang.Object
org.android.activityminer.logic.features.calculators.AbstractCalculator<T,U>
org.android.activityminer.logic.features.calculators.AbstractCompositeCalculator<T,U>
- Type Parameters:
T
- the enumeration type for the dimensionsU
- 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. |
Method Summary |
U |
getValue()
Getter for the calculator value |
void |
reset()
Method to reset the calculator value. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
hasValue
private boolean hasValue
- Flag if the calculator value is already calculated.
AbstractCompositeCalculator
public AbstractCompositeCalculator(T dimension)
- Constructor
- Parameters:
dimension
- the times series dimension to operate on
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>