Robot Simulator of the Robotics Group for Self-Organization of Control  0.8.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
ComplexMeasure Class Reference

#include <complexmeasure.h>

Inheritance diagram for ComplexMeasure:
Collaboration diagram for ComplexMeasure:

Public Member Functions

 ComplexMeasure (const char *measureName, ComplexMeasureMode mode, int numberBins)
 creates a new complex measure. More...
 
virtual void addObservable (double &observedValue, double minValue, double maxValue)
 adds a observed variable to the measure. More...
 
virtual ~ComplexMeasure ()
 
virtual void step ()
 defined by AbstractMeasure. More...
 
- Public Member Functions inherited from AbstractMeasure
 AbstractMeasure (const char *measureName)
 
virtual ~AbstractMeasure ()
 
virtual std::string getName () const
 
virtual double getValue () const
 
virtual double & getValueAddress ()
 
virtual void setStepSize (int newStepSize)
 
virtual int getStepSize () const
 
virtual long getActualStep () const
 
virtual void setDisplayPrecision (int digits)
 
virtual int getDisplayPrecision () const
 
- Public Member Functions inherited from IMeasure
virtual ~IMeasure ()
 

Protected Member Functions

void calculatePInf ()
 calculates the Predictive Information More...
 
void updateEntropy (int binNumber)
 updates the entropy. More...
 
void computeEntropy ()
 computes the entropy. More...
 
void initF ()
 inits F, neccessary after each call of addObservable() More...
 

Protected Attributes

std::list< double * > observedValueList
 
std::list< Discretisizer * > discretisizerList
 
ComplexMeasureMode mode
 
int numberBins
 
long fSize
 
int historySize
 
int * binNumberHistory
 
int historyIndex
 
int * historyIndexList
 
int historyIndexNumber
 
int historyInterval
 
matrix::SparseArray< long, int > F
 
- Protected Attributes inherited from AbstractMeasure
std::string name
 
double value
 
long actualStep
 
int stepSize
 
int displayPrecision
 

Constructor & Destructor Documentation

ComplexMeasure ( const char *  measureName,
ComplexMeasureMode  mode,
int  numberBins 
)

creates a new complex measure.

the calculated things are such like mutual information, entropy, joint entropy and so on. it`s possible to add new ones, see above for the ComplexMeasureModes. Don"t forget! to add observed values! with the method

See Also
addObservable
Parameters
measureNamethe name of the measure, needed for PlotOptions and HUDSM
modethe measure you like to have
numberBinsin earlier versions named as intervalCount. For complex measures the observedValue has to be discretisized, this does the ComplexMeasure with the class Discretisizer for you.
~ComplexMeasure ( )
virtual

Member Function Documentation

void addObservable ( double &  observedValue,
double  minValue,
double  maxValue 
)
virtual

adds a observed variable to the measure.

Parameters
observedValueaddress of the observed value
minValueminimum value the observed value can become
maxValuemaximum value the observed value can become
void calculatePInf ( )
protected

calculates the Predictive Information

void computeEntropy ( )
protected

computes the entropy.

uses the normal rule with O(m*n*o) costs

void initF ( )
protected

inits F, neccessary after each call of addObservable()

void step ( )
virtual

defined by AbstractMeasure.

This method is called from StatisticTools for updating the measure in every simStep (ODE).

Implements IMeasure.

Reimplemented in TrackableMeasure.

void updateEntropy ( int  binNumber)
protected

updates the entropy.

uses update rule with O(1) costs

Parameters
binNumberthe bin number

Member Data Documentation

int* binNumberHistory
protected
std::list<Discretisizer*> discretisizerList
protected
matrix::SparseArray<long, int> F
protected
long fSize
protected
int historyIndex
protected
int* historyIndexList
protected
int historyIndexNumber
protected
int historyInterval
protected
int historySize
protected
ComplexMeasureMode mode
protected
int numberBins
protected
std::list<double*> observedValueList
protected

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