org.android.activityminer.logic.features.calculators
Class AbstractEntropyCalculator<T extends Enum<T> & Dimensions>
java.lang.Object
org.android.activityminer.logic.features.calculators.AbstractCalculator<T,U>
org.android.activityminer.logic.features.calculators.AbstractCompositeCalculator<T,Double>
org.android.activityminer.logic.features.calculators.AbstractEntropyCalculator<T>
- Type Parameters:
T
- the enumeration type for the dimensions
- All Implemented Interfaces:
- Calculator<Double>, CompositeCalculator<Double>
- Direct Known Subclasses:
- EntropyCalculator, FFTEntropyCalculator
public class AbstractEntropyCalculator<T extends Enum<T> & Dimensions>
- extends AbstractCompositeCalculator<T,Double>
Implementation of an abstract entropy calculator.
Field Summary |
protected double |
entropySum
The sum of entropy function values [f(p) = p* log2(p) ] |
protected double |
valueSum
The sum of values |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
valueSum
protected double valueSum
- The sum of values
entropySum
protected double entropySum
- The sum of entropy function values [f(p) = p* log2(p) ]
AbstractEntropyCalculator
public AbstractEntropyCalculator(T dimension)
- Constructor
- Parameters:
dimension
- the sensor observation dimension
getInitialValue
public final Double getInitialValue()
- Description copied from interface:
Calculator
- Method for value initialization.
- Returns:
- the initialized value
getCompositeValue
public Double getCompositeValue()
- Description copied from interface:
CompositeCalculator
- Does calculate the composite value.
- Returns:
- the composite value