FeatureContainer Class Reference

#include <FeatureContainer.h>

Inheritance diagram for FeatureContainer:

LoggingFeatureContainer ReplayFeatureContainer List of all members.
typedef pair< string, FeatureProvider * > featurepair
typedef vector< featurepairfeaturemap
featuremap features

Public Member Functions

 FeatureContainer (ConfigReader *config)
virtual ~FeatureContainer ()
virtual void nextSample ()
virtual featurevector getFeatureVector () const
virtual const featurevectorgetSampleVector () const

Detailed Description

Container class

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.


Member Typedef Documentation

typedef pair<string, FeatureProvider*> FeatureContainer::featurepair [protected]
 

Protected property

Todo:
documentation


Constructor & Destructor Documentation

FeatureContainer::FeatureContainer ConfigReader config  ) 
 

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.

Parameters:
config A ConfigReader instance

FeatureContainer::~FeatureContainer  )  [virtual]
 

Destructor


Member Function Documentation

featurevector FeatureContainer::getFeatureVector  )  const [virtual]
 

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.

Returns:
A vector of Feature implementations. Every element of the returned vector must be freed after use.
See also:
Feature

FeatureContainer::getFeature

const featurevector * FeatureContainer::getSampleVector  )  const [virtual]
 

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.

Returns:
A reference to a globally allocated vector containing features that represent the current sensor values.

Reimplemented in ReplayFeatureContainer.

void FeatureContainer::nextSample  )  [virtual]
 

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.

See also:
FeatureContainer::nextSample

FeatureContainer::getSample

getSampleVector

Reimplemented in LoggingFeatureContainer, and ReplayFeatureContainer.


The documentation for this class was generated from the following files:
Generated on Mon Jun 5 10:20:49 2006 for Intelligence.kdevelop by  doxygen 1.4.6