Statistics class to collect doubles and calculate weighted statistics of them. More...
#include <cstddev.h>
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 *) |
Statistics class to collect doubles and calculate weighted statistics of them.
It can be used for example to calculate time average.
| virtual void cWeightedStdDev::collect2 | ( | double | value, | |
| double | weight | |||
| ) | [virtual] |
Collects one value with a given weight.
Negative weights will cause a runtime error.
Reimplemented from cStatistic.
| virtual cWeightedStdDev* cWeightedStdDev::dup | ( | ) | const [inline, virtual] |
| virtual std::string cWeightedStdDev::info | ( | ) | const [virtual] |
| cWeightedStdDev& cWeightedStdDev::operator= | ( | const cWeightedStdDev & | res | ) |
Assignment operator.
The name member is not copied; see cNamedObject's operator=() for more details.
| virtual void cWeightedStdDev::parsimPack | ( | cCommBuffer * | buffer | ) | [virtual] |
| virtual void cWeightedStdDev::parsimUnpack | ( | cCommBuffer * | buffer | ) | [virtual] |
1.6.3