Reinforcement Learning Toolbox 2.0
last updated:
General
Documentation
Manual
Tutorial
Class Reference
Master Thesis
Examples
Related Papers
Downloads
Links
News
mailto:webmaster
Main Page     Class Hierarchy   Compound List   File List   Compound Members   File Members

CLinearMultiFeatureCalculator Class Reference

Super class for all feature calculators that use a grid and where more than one feature can be active. More...

#include <clinearfafeaturecalculator.h>

Inheritance diagram for CLinearMultiFeatureCalculator:

CGridFeatureCalculator CFeatureCalculator CStateModifier CStateProperties CLinearInterpolationFeatureCalculator CRBFFeatureCalculator List of all members.


Public Member Functions

  CLinearMultiFeatureCalculator (unsigned int numDim, unsigned int dimensions[], unsigned int partitions[], double offsets[], unsigned int numFeatures)
  For details about creating the grid see the super class.

  ~CLinearMultiFeatureCalculator ()
virtual void  getModifiedState (CStateCollection *state, CState *featState)
  Calculates the feature state with multiple active features.



Protected Member Functions

virtual double  getFeatureFactor (CState *state, ColumnVector *featPos)=0
  Interface function for returning the feature activation factor.

virtual void  initAreaSize ()
  Interface function for setting the areaSize array.

virtual void  calcNumActiveFeatures ()
  calculates the number of active feature and stores it in areaNumPart



Protected Attributes

unsigned int *  areaSize
unsigned int  areaNumPart
ColumnVector *  activePosition
ColumnVector *  featurePosition
unsigned int *  actualPartition
unsigned int *  singleStateFeatures

Detailed Description

Super class for all feature calculators that use a grid and where more than one feature can be active.

If we use CLinearMultiFeatureCalculator more than one feature can be active in the grid. The class mantains an additional array which mantains the number of active features in each direction, so a value of 1 for dimension 0 means that there are 3 active features for dimension 0 (the current feature itself and it's left and right neighbors) . This array has to be set by the subclasses with the function initAreaSize (which has also to be called by the subclasses in the constructor). For each feature that is in the "active" area, the feature factor is calculated by the function getFeatureFactor, which also has to be implemented by the subclasses.


Constructor & Destructor Documentation

CLinearMultiFeatureCalculator::CLinearMultiFeatureCalculator unsigned int  numDim,
unsigned int  dimensions[],
unsigned int  partitions[],
double  offsets[],
unsigned int  numFeatures
 

For details about creating the grid see the super class.

CLinearMultiFeatureCalculator::~CLinearMultiFeatureCalculator  ) 
 

Member Function Documentation

virtual void CLinearMultiFeatureCalculator::calcNumActiveFeatures  )  [protected, virtual]
 

calculates the number of active feature and stores it in areaNumPart

Has to be called by initAreaSize. Uses the areaSize array to calculate the number of active features. The number of active features is 2 * areaSize[i] + 1 for each dimension i.

virtual double CLinearMultiFeatureCalculator::getFeatureFactor CState state,
ColumnVector *  featPos
[protected, pure virtual]
 

Interface function for returning the feature activation factor.

As input the method gets the current model state and the position of the feature as vector.

Implemented in CRBFFeatureCalculator, and CLinearInterpolationFeatureCalculator.

virtual void CLinearMultiFeatureCalculator::getModifiedState CStateCollection state,
CState featState
[virtual]
 

Calculates the feature state with multiple active features.

The class mantains an additional array which mantains the number of active features in each direction, so a value of 1 for dimension 0 means that there are 3 active features for dimension 0 (the current feature itself and it's left and right neighbors) . This array has to be set by the subclasses with the function initAreaSize (which has also to be called by the subclasses in the constructor). For each feature that is in the "active" area, the feature factor is calculated by the function getFeatureFactor, which also has to be implemented by the subclasses. For periodic states the active area is mirrored into the state intervall again if it leaves the intervall, for non-periodic states the active area is cut off. At the end all feature factors get normalized (sum = 1.0)

Implements CGridFeatureCalculator.

virtual void CLinearMultiFeatureCalculator::initAreaSize  )  [protected, virtual]
 

Interface function for setting the areaSize array.

Function has to set the number of active features in each direction. o a value of 1 for dimension 0 means that there are 3 active features for dimension 0 (the current feature itself and it's left and right neighbors). Has to be called by the subclass's constructor and has to call the calcNumActiveFeatures method.

Reimplemented in CRBFFeatureCalculator, and CLinearInterpolationFeatureCalculator.


Member Data Documentation

ColumnVector* CLinearMultiFeatureCalculator::activePosition [protected]
 
unsigned int* CLinearMultiFeatureCalculator::actualPartition [protected]
 
unsigned int CLinearMultiFeatureCalculator::areaNumPart [protected]
 
unsigned int* CLinearMultiFeatureCalculator::areaSize [protected]
 
ColumnVector* CLinearMultiFeatureCalculator::featurePosition [protected]
 
unsigned int* CLinearMultiFeatureCalculator::singleStateFeatures [protected]
 

The documentation for this class was generated from the following file: