#include <statistictools.h>
Inherits Inspectable, and Callbackable.
Inheritance diagram for StatisticTools:
Public Member Functions | |
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 StatisticMeasure * | getMeasure (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 |
StatisticTools | ( | ) | [inline] |
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
measure | the measure to add |
double & addMeasure | ( | double & | observedValue, | |
const char * | measureName, | |||
MeasureMode | mode, | |||
long | stepSpan, | |||
double | additionalParam = 0 | |||
) | [virtual] |
adds a variable to observe and measure the value
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. |
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.
measureList | the list of measures to add |
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.
measureList | the list of measures to add |
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.
measureList | the list of measures to add |
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.
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.
std::list<AbstractMeasure*> activeMeasures [protected] |
long beginMeasureCounter [protected] |