marf.FeatureExtraction
Class FeatureExtractionAggregator.FeatureExtractionThread

java.lang.Object
  extended by java.lang.Thread
      extended by marf.util.BaseThread
          extended by marf.FeatureExtraction.FeatureExtractionAggregator.FeatureExtractionThread
All Implemented Interfaces:
java.lang.Runnable
Enclosing class:
FeatureExtractionAggregator

public class FeatureExtractionAggregator.FeatureExtractionThread
extends BaseThread

A feature extraction thread simply calls its concrete encapsulated feature extraction module and collects any results or errors from its run.

Since:
0.3.0.5
Author:
Serguei Mokhov

Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler
 
Field Summary
protected  double[] adSampleData
          Sample data container reference if the data is coming not from preprocessing.
protected  boolean bRetVal
          Keeps return value from extractFeatures() in case someone is interested.
protected  IFeatureExtraction oFeatureExtraction
          A reference to the feature extraction module.
protected  java.lang.Exception oLastException
          Last exception captured after feature extraction run.
 
Fields inherited from class marf.util.BaseThread
iTID, oTarget, siNextTID
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
FeatureExtractionAggregator.FeatureExtractionThread(IFeatureExtraction poFeatureExtraction, ExpandedThreadGroup poGroup)
          Constructs a feature extraction thread with a given module.
FeatureExtractionAggregator.FeatureExtractionThread(IFeatureExtraction poFeatureExtraction, ExpandedThreadGroup poGroup, double[] padSampleData)
          Constructs a feature extraction thread with a given module and sample data from external source.
 
Method Summary
 IFeatureExtraction getFeatureExtraction()
          Allows obtaining the reference to the contained feature extraction module.
 java.lang.Exception getLastException()
          Allows to query for the last error happened while extracting features.
 boolean getRetVal()
          Allows to query for the feature extraction success return value.
 void run()
          Internally calls extractFeatures() and collects its return value and possibly its last error.
 
Methods inherited from class marf.util.BaseThread
getMARFSourceCodeRevision, getNextTID, getTarget, getTID
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

oFeatureExtraction

protected IFeatureExtraction oFeatureExtraction
A reference to the feature extraction module.


bRetVal

protected boolean bRetVal
Keeps return value from extractFeatures() in case someone is interested.

See Also:
IFeatureExtraction.extractFeatures()

oLastException

protected java.lang.Exception oLastException
Last exception captured after feature extraction run.


adSampleData

protected double[] adSampleData
Sample data container reference if the data is coming not from preprocessing.

Since:
0.3.0.6
Constructor Detail

FeatureExtractionAggregator.FeatureExtractionThread

public FeatureExtractionAggregator.FeatureExtractionThread(IFeatureExtraction poFeatureExtraction,
                                                           ExpandedThreadGroup poGroup)
Constructs a feature extraction thread with a given module.

Parameters:
poFeatureExtraction - the module; must not be null
poGroup - the thread group to attach this thread to

FeatureExtractionAggregator.FeatureExtractionThread

public FeatureExtractionAggregator.FeatureExtractionThread(IFeatureExtraction poFeatureExtraction,
                                                           ExpandedThreadGroup poGroup,
                                                           double[] padSampleData)
Constructs a feature extraction thread with a given module and sample data from external source.

Parameters:
poFeatureExtraction - the module; must not be null
poGroup - the thread group to attach this thread to
padSampleData -
Since:
0.3.0.6
Method Detail

run

public void run()
Internally calls extractFeatures() and collects its return value and possibly its last error.

Specified by:
run in interface java.lang.Runnable
Overrides:
run in class java.lang.Thread
See Also:
Runnable.run(), IFeatureExtraction.extractFeatures()

getRetVal

public boolean getRetVal()
Allows to query for the feature extraction success return value.

Returns:
the return value of extractFeatures()
See Also:
IFeatureExtraction.extractFeatures()

getFeatureExtraction

public IFeatureExtraction getFeatureExtraction()
Allows obtaining the reference to the contained feature extraction module.

Returns:
the internal feature extraction module reference

getLastException

public java.lang.Exception getLastException()
Allows to query for the last error happened while extracting features.

Returns:
the last exception; null if there were none (yet or postmortem)


SourceForge Logo