|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.android.activityminer.app.recognizer.RecognizerHelper<T>
T
- the enumeration type for the dimensionspublic class RecognizerHelper<T extends Enum<T> & Dimensions>
The recognition component.
Field Summary | |
---|---|
private ActivatableComponent |
activationDelegation
activatable component implementation to delegate to |
private android.support.v4.util.LongSparseArray<String> |
cId2NameMapping
The class identifier to name mapping |
private Classifier |
classifier
The classifier. |
private Context |
context
The context. |
private GenericObservableCutoutCreator<T,Double> |
cutoutCreator
The cut-out creator. |
private AbstractFeatureExtractor<T> |
featureExtractor
The feature extractor component. |
private PredictionResult |
lastPrediction
The last prediction |
private ObservableSensorScanner<T,Double> |
sensorScanner
The observable sensor scanner. |
private PowerManager.WakeLock |
wakeLock
The wake lock. |
Constructor Summary | |
---|---|
private |
RecognizerHelper(Context context,
Classifier classifier,
AbstractFeatureExtractor<T> featureExtractor,
ObservableSensorScanner<T,Double> sensorScanner,
RuntimeConfiguration config,
android.support.v4.util.LongSparseArray<String> cId2NameMapping)
Constructor |
Method Summary | |
---|---|
private void |
acquireWakeLock()
Does acquire the wake lock |
static RecognizerHelper<?> |
createHelper(Context context,
String modelName)
Builder method for the helper instance |
void |
doTerminate()
Method to stop activity recognition. |
boolean |
isActive()
Test method for the actiation state. |
protected void |
onActivationStateChange(boolean active)
|
void |
onEvent(ObservableEventSource<? extends FeatureVector> eventSource,
FeatureVector featureVector)
|
private void |
releaseWakeLock()
Does release the wake lock |
void |
setActivationState(boolean active)
Method to set the activation state of the component |
protected void |
storePredictionInfo(double certainty,
String predictedClass,
Long timeStamp)
Does store the prediction to database |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private final Context context
private final ActivatableComponent activationDelegation
private final PowerManager.WakeLock wakeLock
private final AbstractFeatureExtractor<T extends Enum<T> & Dimensions> featureExtractor
private final GenericObservableCutoutCreator<T extends Enum<T> & Dimensions,Double> cutoutCreator
private final ObservableSensorScanner<T extends Enum<T> & Dimensions,Double> sensorScanner
private final Classifier classifier
private final android.support.v4.util.LongSparseArray<String> cId2NameMapping
private PredictionResult lastPrediction
Constructor Detail |
---|
private RecognizerHelper(Context context, Classifier classifier, AbstractFeatureExtractor<T> featureExtractor, ObservableSensorScanner<T,Double> sensorScanner, RuntimeConfiguration config, android.support.v4.util.LongSparseArray<String> cId2NameMapping)
context
- the contextclassifier
- the classifierfeatureExtractor
- the feature extractorsensorScanner
- the sensor scannerconfig
- the runtime configurationcId2NameMapping
- the class identifier to name mappingMethod Detail |
---|
protected final void onActivationStateChange(boolean active)
active
- private final void releaseWakeLock()
private final void acquireWakeLock()
public final void doTerminate()
public void onEvent(ObservableEventSource<? extends FeatureVector> eventSource, FeatureVector featureVector)
onEvent
in interface EventObserver<FeatureVector>
protected void storePredictionInfo(double certainty, String predictedClass, Long timeStamp)
certainty
- the certaintypredictedClass
- the predicted classtimeStamp
- the time stamppublic static final RecognizerHelper<?> createHelper(Context context, String modelName)
context
- the application contextmodelName
- the model name
public void setActivationState(boolean active)
ActivatableComponent
setActivationState
in interface ActivatableComponent
active
- the activation sate flagpublic boolean isActive()
ActivatableComponent
isActive
in interface ActivatableComponent
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |