class BaseStat

The basic statistical class

Inheritance:


Public Methods

static void init(int n)
Must be called before the first run
static void endRun(void) throw(StatExc)
automatically called at the end of the run, collects all stats.
static void newRun(void)
automatically called at the beginning of the run, prepare the int values
static void endSim(void)
automatically called at the end of the sim, write the files.
static void setTransitory(Tick t)
BaseStat(char *n = "")
Constructors: enqueues the object in the global stat list
static inline BaseStat* getHead(void)
These functions are used during output processing: using getHead() & getNext() it is possible to scan all the registered statistical probes and dump their data through getMean() & getConfInterval()
virtual void record(double)
Level 1 function: it is called by the probe() (level 2)
virtual void probe(Event *e)
level 2 function: called by the event action() method
virtual void attach(Entity *e) throw(StatExc)
This function links the statistical probe to the correct events associated with a given entity
inline string& getName(void)
Returns the name of this stat
inline double getValue(void)
Returns the current value of the stat object
double getMean(void) throw(StatExc)
Returns the mean value
double getVariance(void) throw(StatExc)
returns the variance

Protected Fields

string name
name of the stat object
double val
current computed value (during the run).
vector exper
array of values, one for each run.
static Tick transitory
lenght of the transitory.
static bool initFlag
used to see if the base stat class has been initialized. (???)

Protected Methods

inline void collect()
called at the end of the run, puts the current value in the array of experiments
static double get_t_perc(double alpha)
t-student function
static void calc_t(int n)
computes the t-student with parameter n.
double t_student(int alfa, int dol)
returns the t-student with parameter alfa and dol.

Documentation

The basic statistical class
string name
name of the stat object

double val
current computed value (during the run).

vector exper
array of values, one for each run.

inline void collect()
called at the end of the run, puts the current value in the array of experiments

static Tick transitory
lenght of the transitory.

static bool initFlag
used to see if the base stat class has been initialized. (???)

static double get_t_perc(double alpha)
t-student function

static void calc_t(int n)
computes the t-student with parameter n.

double t_student(int alfa, int dol)
returns the t-student with parameter alfa and dol.

static void init(int n)
Must be called before the first run.
Parameters:
n - number of runs.

static void endRun(void) throw(StatExc)
automatically called at the end of the run, collects all stats.

static void newRun(void)
automatically called at the beginning of the run, prepare the int values

static void endSim(void)
automatically called at the end of the sim, write the files.

static void setTransitory(Tick t)

BaseStat(char *n = "")
Constructors: enqueues the object in the global stat list

static inline BaseStat* getHead(void)
These functions are used during output processing: using getHead() & getNext() it is possible to scan all the registered statistical probes and dump their data through getMean() & getConfInterval()

virtual void record(double)
Level 1 function: it is called by the probe() (level 2)

virtual void probe(Event *e)
level 2 function: called by the event action() method

virtual void attach(Entity *e) throw(StatExc)
This function links the statistical probe to the correct events associated with a given entity

inline string& getName(void)
Returns the name of this stat

inline double getValue(void)
Returns the current value of the stat object

double getMean(void) throw(StatExc)
Returns the mean value

double getVariance(void) throw(StatExc)
returns the variance


Direct child classes:
StatPercent
StatMin
StatMean
StatMax
StatCount

alphabetic index hierarchy of classes


this page has been generated automatically by doc++

(c)opyright by Malte Zöckler, Roland Wunderling
contact: doc++@zib.de