#include <cstddev.h>

It can be used for example to calculate time average.
Public Member Functions | |
Constructors, destructor, assignment. | |
| cWeightedStdDev (const cWeightedStdDev &r) | |
| cWeightedStdDev (const char *name=NULL) | |
| virtual | ~cWeightedStdDev () |
| cWeightedStdDev & | operator= (const cWeightedStdDev &res) |
Redefined cObject member functions. | |
| virtual cWeightedStdDev * | dup () const |
| virtual std::string | info () const |
| virtual void | parsimPack (cCommBuffer *buffer) |
| virtual void | parsimUnpack (cCommBuffer *buffer) |
Redefined cStatistic functions. | |
| virtual void | collect (double value) |
| virtual void | collect (SimTime value) |
| virtual bool | isWeighted () const |
| virtual void | collect2 (double value, double weight) |
| virtual void | collect2 (SimTime value, double weight) |
| virtual void | collect2 (double value, SimTime weight) |
| virtual void | collect2 (SimTime value, SimTime weight) |
| virtual void | merge (const cStatistic *other) |
| virtual void | clearResult () |
| virtual double | getMean () const |
| virtual double | getVariance () const |
| virtual double | getWeights () const |
| virtual double | getWeightedSum () const |
| virtual double | getSqrSumWeights () const |
| virtual double | getWeightedSqrSum () const |
| virtual void | saveToFile (FILE *) const |
| virtual void | loadFromFile (FILE *) |
| cWeightedStdDev::cWeightedStdDev | ( | const cWeightedStdDev & | r | ) | [inline] |
Constructors, destructor, duplication and assignment.
| cWeightedStdDev::cWeightedStdDev | ( | const char * | name = NULL |
) | [inline, explicit] |
Constructors, destructor, duplication and assignment.
| virtual cWeightedStdDev::~cWeightedStdDev | ( | ) | [inline, virtual] |
Constructors, destructor, duplication and assignment.
| cWeightedStdDev& cWeightedStdDev::operator= | ( | const cWeightedStdDev & | res | ) |
Assignment operator.
The name member is not copied; see cNamedObject's operator=() for more details.
| virtual cWeightedStdDev* cWeightedStdDev::dup | ( | ) | const [inline, virtual] |
| virtual std::string cWeightedStdDev::info | ( | ) | const [virtual] |
| virtual void cWeightedStdDev::parsimPack | ( | cCommBuffer * | buffer | ) | [virtual] |
| virtual void cWeightedStdDev::parsimUnpack | ( | cCommBuffer * | buffer | ) | [virtual] |
| virtual void cWeightedStdDev::collect | ( | double | value | ) | [inline, virtual] |
| virtual void cWeightedStdDev::collect | ( | SimTime | value | ) | [inline, virtual] |
Convenience method, delegates to collect(double).
Reimplemented from cStdDev.
References cStdDev::collect(), and SimTime::dbl().
| virtual bool cWeightedStdDev::isWeighted | ( | ) | const [inline, virtual] |
| virtual void cWeightedStdDev::collect2 | ( | double | value, | |
| double | weight | |||
| ) | [virtual] |
| virtual void cWeightedStdDev::collect2 | ( | SimTime | value, | |
| double | weight | |||
| ) | [inline, virtual] |
Convenience method, delegates to collect2(double, double).
References cStatistic::collect2(), and SimTime::dbl().
| virtual void cWeightedStdDev::collect2 | ( | double | value, | |
| SimTime | weight | |||
| ) | [inline, virtual] |
Convenience method, delegates to collect2(double, double).
References cStatistic::collect2(), and SimTime::dbl().
Convenience method, delegates to collect2(double, double).
References cStatistic::collect2(), and SimTime::dbl().
| virtual void cWeightedStdDev::merge | ( | const cStatistic * | other | ) | [virtual] |
Updates this object with data coming from another statistics object -- as if this object had collected observations fed into the other object as well.
Reimplemented from cStdDev.
| virtual void cWeightedStdDev::clearResult | ( | ) | [virtual] |
| virtual double cWeightedStdDev::getMean | ( | ) | const [inline, virtual] |
Returns the mean of the observations collected.
Returns 0.0 if nothing was collected yet.
Reimplemented from cStdDev.
| virtual double cWeightedStdDev::getVariance | ( | ) | const [virtual] |
| virtual double cWeightedStdDev::getWeights | ( | ) | const [inline, virtual] |
| virtual double cWeightedStdDev::getWeightedSum | ( | ) | const [inline, virtual] |
| virtual double cWeightedStdDev::getSqrSumWeights | ( | ) | const [inline, virtual] |
| virtual double cWeightedStdDev::getWeightedSqrSum | ( | ) | const [inline, virtual] |
| virtual void cWeightedStdDev::saveToFile | ( | FILE * | ) | const [virtual] |
| virtual void cWeightedStdDev::loadFromFile | ( | FILE * | ) | [virtual] |
Reads the object data from a file, in the format written out by saveToFile().
Reimplemented from cStdDev.
1.5.5