StatisticTools Class Reference

TODO: add possibility to pass description of a measure. More...

#include <statistictools.h>

Inherits Inspectable, and Callbackable.

Collaboration diagram for StatisticTools:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 StatisticTools (const std::string &name="StatisticTools")
virtual double & addMeasure (double &observedValue, const char *measureName, MeasureMode mode, long stepSpan, double additionalParam=0)
 adds a variable to observe and measure the value
virtual StatisticMeasuregetMeasure (double &observedValue, const char *measureName, MeasureMode mode, long stepSpan, double additionalParam=0)
 Same as the method above, but instead of getting the calculated value back (the adress), you get the StatisticMeasure itself.
virtual double & addMeasure (AbstractMeasure *measure)
 You can add another abstract measure you like.
virtual double & addMeasureList (std::list< AbstractMeasure * > measureList)
 You can add another abstract measure you like.
virtual double & addMeasureList (std::list< ComplexMeasure * > measureList)
 You can add another abstract measure you like.
virtual double & addMeasureList (std::list< StatisticMeasure * > measureList)
 You can add another abstract measure you like.
virtual void beginMeasureAt (long step)
 starts the measure at a specific time.
virtual bool measureStarted ()
 Tells you wether the measures have already been started.
virtual void doOnCallBack (BackCaller *source, BackCaller::CallbackableType type=BackCaller::DEFAULT_CALLBACKABLE_TYPE)
 CALLBACKABLE INTERFACE.

Protected Attributes

std::list< AbstractMeasure * > activeMeasures
long beginMeasureCounter

Detailed Description

TODO: add possibility to pass description of a measure.


Constructor & Destructor Documentation

StatisticTools ( const std::string &  name = "StatisticTools"  )  [inline]

Member Function Documentation

double & addMeasure ( AbstractMeasure measure  )  [virtual]

You can add another abstract measure you like.

in some cases (e.g. complex measures) it is better to let the measure decide how it likes to be initialized

Parameters:
measure the measure to add
Returns:
the address value of the measure
double & addMeasure ( double &  observedValue,
const char *  measureName,
MeasureMode  mode,
long  stepSpan,
double  additionalParam = 0 
) [virtual]

adds a variable to observe and measure the value

Parameters:
observedValue the value to observe.
measureName the name of the measured value
mode the mode of measure
stepSpan in most cases the stepSpan is important to get the measured value of a number of steps, like AVG: if stepSpan = 0, AVG is calculated over all steps if stepSpan = n, AVG is calculated over the LAST n steps The same counts for all the other MeasureModes.
additionalParam is used for example for mode PEAK, the param is the limit value, all values minus limit are displayed, values below the limit are set to 0. In CONV mode (test the convergence), this value is the epsilon criteria.
Returns:
measured value as adress. So it is possible to measure this value again
double & addMeasureList ( std::list< StatisticMeasure * >  measureList  )  [virtual]

You can add another abstract measure you like.

in some cases (e.g. complex measures) it is better to let the measure decide how it likes to be initialized With this method you can add a list of AbstractMeasures.

Parameters:
measureList the list of measures to add
Returns:
the address value of the first measure
double & addMeasureList ( std::list< ComplexMeasure * >  measureList  )  [virtual]

You can add another abstract measure you like.

in some cases (e.g. complex measures) it is better to let the measure decide how it likes to be initialized With this method you can add a list of AbstractMeasures.

Parameters:
measureList the list of measures to add
Returns:
the address value of the first measure
double & addMeasureList ( std::list< AbstractMeasure * >  measureList  )  [virtual]

You can add another abstract measure you like.

in some cases (e.g. complex measures) it is better to let the measure decide how it likes to be initialized With this method you can add a list of AbstractMeasures.

Parameters:
measureList the list of measures to add
Returns:
the address value of the first measure
void beginMeasureAt ( long  step  )  [virtual]

starts the measure at a specific time.

This is useful if there are values that have to be ignored at simulation start.

Parameters:
step number of steps (normally simsteps) to wait for beginning the measures
void doOnCallBack ( BackCaller source,
BackCaller::CallbackableType  type = BackCaller::DEFAULT_CALLBACKABLE_TYPE 
) [virtual]

CALLBACKABLE INTERFACE.

this method is invoked when a callback is done from the class where this class is for callback registered

Implements Callbackable.

StatisticMeasure * getMeasure ( double &  observedValue,
const char *  measureName,
MeasureMode  mode,
long  stepSpan,
double  additionalParam = 0 
) [virtual]

Same as the method above, but instead of getting the calculated value back (the adress), you get the StatisticMeasure itself.

virtual bool measureStarted (  )  [inline, virtual]

Tells you wether the measures have already been started.

Returns:
true if measures have already been started, otherwise false

Member Data Documentation

std::list<AbstractMeasure*> activeMeasures [protected]
long beginMeasureCounter [protected]

The documentation for this class was generated from the following files:
Generated on Thu Jun 28 14:48:19 2012 for Robot Simulator of the Robotics Group for Self-Organization of Control by  doxygen 1.6.3