#include <FeatureContainer.h>
Inheritance diagram for FeatureContainer:
typedef pair< string, FeatureProvider * > | featurepair |
typedef vector< featurepair > | featuremap |
featuremap | features |
Public Member Functions | |
FeatureContainer (ConfigReader *config) | |
virtual | ~FeatureContainer () |
virtual void | nextSample () |
virtual featurevector | getFeatureVector () const |
virtual const featurevector * | getSampleVector () const |
Loads and initializes the feature providers as defined in the configuration file. It provides methods to commonly operate on all loaded providers and their requested features.
|
Protected property
|
|
Constructor Loads all feature providers listed in the configuration file and initializes them with the according parameters. It then loads all requested features and restores persistant information for them.
|
|
Destructor |
|
Get random feature vector A feature vector contains pointers to implementations of the specific features, but initialized with random values. These random positions in the feature space are usually used for initializing classification algorithms. The feature objects returned by this method are allocated automatically for the caller (since the caller can not know the specific implementations, this method acts as a fectors), but must be freed by the caller. The specific feature objects are created by the FeatureContainer implementations, as this method calls getFeature for every dimension.
|
|
Get sample vector A sample vector contains pointers to implementations of the specific features, with values representing the current sensor values. For performance reasons (since this method can be called by multiple callers in the same time step for retrieving the current feature values), this method returns a pointer to a globally allocated object. Callers must not free or modify either the returned vector reference or the feature implementations contained therein.
Reimplemented in ReplayFeatureContainer. |
|
Retrieve next sample Retrieve next samples from all features at once. This method should be called at the beginning of each time step. This method calls nextSample for each FeatureContainer and then allocates the global feature vector which can be returned by successive calls to getSampleVector. The specific feature objects are created by the FeatureContainer implementations, as this method calls getSample for every dimension.
Reimplemented in LoggingFeatureContainer, and ReplayFeatureContainer. |