|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||

java.lang.Objectorg.android.activityminer.logic.features.calculators.AbstractCalculator<T,U>
org.android.activityminer.logic.features.calculators.AbstractCompositeCalculator<T,Double>
org.android.activityminer.logic.features.calculators.FFTCalculator<T>
T - the enumeration type for the dimensionspublic final class FFTCalculator<T extends Enum<T> & Dimensions>
Implementation of an observable FFT component calculator. It can be observed for all but the DC component which is returned as calculator value. Energy spectrum is calculated as the squared magnitudes of the FFT coefficients: for the FFT coefficient FFT(i)=(re, im) the magnitude is mag(i)=Math.sqrt(re*re + im*im) and the spectral energy is se(i)=(mag(i)*mag(i)).
| Field Summary | |
|---|---|
private int |
cntComponents
The count of FFT components. |
private ObservableEventSource<FFTCalculatorEvent> |
fftEventSource
The event source to delegate to. |
private DimensionValueCache<T> |
valueCache
The value cache. |
| Fields inherited from class org.android.activityminer.logic.features.calculators.AbstractCalculator |
|---|
dimension, value |
| Constructor Summary | |
|---|---|
FFTCalculator(DimensionValueCache<T> valueCache)
Constructor |
|
| Method Summary | |
|---|---|
int |
getComponentCount()
Getter for the component count |
Double |
getCompositeValue()
Does calculate the composite value. |
Double |
getInitialValue()
Method for value initialization. |
DimensionValueCache<T> |
getValueCache()
Getter for the value cache calculator. |
boolean |
hasObservers()
|
void |
notify(FFTCalculatorEvent data)
|
void |
registerEventObserver(EventObserver<? extends FFTCalculatorEvent> observer)
|
void |
removeAllObservers()
|
void |
unregisterEventObserver(EventObserver<? extends FFTCalculatorEvent> observer)
|
| Methods inherited from class org.android.activityminer.logic.features.calculators.AbstractCompositeCalculator |
|---|
getValue, reset |
| 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 |
| Field Detail |
|---|
private int cntComponents
private final ObservableEventSource<FFTCalculatorEvent> fftEventSource
private final DimensionValueCache<T extends Enum<T> & Dimensions> valueCache
| Constructor Detail |
|---|
public FFTCalculator(DimensionValueCache<T> valueCache)
valueCache - the value cache| Method Detail |
|---|
public final int getComponentCount()
public final Double getInitialValue()
Calculator
getInitialValue in interface Calculator<Double>public Double getCompositeValue()
CompositeCalculator
getCompositeValue in interface CompositeCalculator<Double>public DimensionValueCache<T> getValueCache()
public void registerEventObserver(EventObserver<? extends FFTCalculatorEvent> observer)
registerEventObserver in interface ObserverRegistration<FFTCalculatorEvent>public void unregisterEventObserver(EventObserver<? extends FFTCalculatorEvent> observer)
unregisterEventObserver in interface ObserverRegistration<FFTCalculatorEvent>public void removeAllObservers()
removeAllObservers in interface ObserverRegistration<FFTCalculatorEvent>public void notify(FFTCalculatorEvent data)
notify in interface ObservableEventSource<FFTCalculatorEvent>public boolean hasObservers()
hasObservers in interface ObservableEventSource<FFTCalculatorEvent>
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||