|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.beadsproject.beads.core.Bead
net.beadsproject.beads.analysis.FeatureExtractor<R,P>
public abstract class FeatureExtractor<R,P>
FeatureExtractor is an abstract base class for classes that perform some kind of analysis
on incoming data. Both the incoming data (P) and the generated data (R) are generic types.
Implementing classes use the method process(net.beadsproject.beads.core.TimeStamp, net.beadsproject.beads.core.TimeStamp, P)
to process data.
Field Summary | |
---|---|
protected java.lang.String[] |
featureDescriptions
An array of Strings providing descriptions of the feature data. |
protected R |
features
The current feature data. |
protected java.lang.String |
name
The name of the FeatureExtractor. |
protected int |
numFeatures
The number of features. |
Constructor Summary | |
---|---|
FeatureExtractor()
Instantiates a new FeatureExtractor. |
Method Summary | |
---|---|
void |
addListener(FeatureExtractor<?,R> listener)
Adds a FeatureExtractor to listen to this FeatureExtractor. |
void |
forward(TimeStamp startTime,
TimeStamp endTime)
Subclasses should call this at end of their process() method to forward features to listeners. |
java.lang.String[] |
getFeatureDescriptions()
Gets the feature descriptions. |
R |
getFeatures()
Gets the current features of type R, specified in the class def. |
java.lang.String |
getName()
Gets the name. |
int |
getNumberOfFeatures()
Gets the number of features. |
abstract void |
process(TimeStamp startTime,
TimeStamp endTime,
P data)
Process some data of type P (specified by the class def). |
void |
removeListener(FeatureExtractor<?,R> listener)
Removes a FeatureExtractor from the list of listeners. |
void |
setName(java.lang.String name)
Sets the name. |
void |
setNumberOfFeatures(int numFeatures)
Sets the number of features. |
Methods inherited from class net.beadsproject.beads.core.Bead |
---|
getKillListener, isDeleted, isPaused, kill, message, messageReceived, pause, setKillListener, start, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected int numFeatures
protected R features
protected java.lang.String name
protected java.lang.String[] featureDescriptions
Constructor Detail |
---|
public FeatureExtractor()
Method Detail |
---|
public abstract void process(TimeStamp startTime, TimeStamp endTime, P data)
data
- the data.public void forward(TimeStamp startTime, TimeStamp endTime)
public void addListener(FeatureExtractor<?,R> listener)
listener
- the FeatureExtractor that listens to this one.public void removeListener(FeatureExtractor<?,R> listener)
listener
- the FeatureExtractor to remove.public R getFeatures()
public int getNumberOfFeatures()
public void setNumberOfFeatures(int numFeatures)
numFeatures
- the new number of features.public void setName(java.lang.String name)
setName
in class Bead
name
- the new name.public java.lang.String getName()
getName
in class Bead
public java.lang.String[] getFeatureDescriptions()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |