#include <cstddev.h>

Public Member Functions | |
Constructors, destructor, assignment. | |
| cStdDev (const cStdDev &r) | |
| cStdDev (const char *name=NULL) | |
| virtual | ~cStdDev () |
| cStdDev & | operator= (const cStdDev &res) |
Redefined cObject member functions. | |
| virtual cStdDev * | dup () const |
| virtual std::string | info () const |
| virtual std::string | detailedInfo () 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 void | merge (const cStatistic *other) |
| virtual bool | isWeighted () const |
| virtual long | getCount () const |
| virtual double | getSum () const |
| virtual double | getSqrSum () const |
| virtual double | getMin () const |
| virtual double | getMax () const |
| virtual double | getMean () const |
| virtual double | getStddev () const |
| virtual double | getVariance () const |
| virtual double | getWeights () const |
| virtual double | getWeightedSum () const |
| virtual double | getSqrSumWeights () const |
| virtual double | getWeightedSqrSum () const |
| virtual double | random () const |
| virtual void | clearResult () |
| virtual void | saveToFile (FILE *) const |
| virtual void | loadFromFile (FILE *) |
| cStdDev::cStdDev | ( | const cStdDev & | r | ) | [inline] |
Copy constructor.
References cNamedObject::getName(), cStatistic::operator=(), and cNamedObject::setName().
| cStdDev::cStdDev | ( | const char * | name = NULL |
) | [explicit] |
Constructor.
| virtual cStdDev::~cStdDev | ( | ) | [inline, virtual] |
Destructor.
Assignment operator.
The name member doesn't get copied; see cNamedObject's operator=() for more details.
Referenced by cDensityEstBase::cDensityEstBase(), and cWeightedStdDev::cWeightedStdDev().
| virtual cStdDev* cStdDev::dup | ( | ) | const [inline, virtual] |
Creates and returns an exact copy of this object.
See cObject for more details.
Reimplemented from cObject.
Reimplemented in cLongHistogram, cDoubleHistogram, cKSplit, cPSquare, cWeightedStdDev, and cVarHistogram.
| virtual std::string cStdDev::info | ( | ) | const [virtual] |
Produces a one-line description of the object's contents.
See cObject for more details.
Reimplemented from cObject.
Reimplemented in cWeightedStdDev.
| virtual std::string cStdDev::detailedInfo | ( | ) | const [virtual] |
Produces a multi-line description of the object.
See cObject for more details.
Reimplemented from cObject.
Reimplemented in cDensityEstBase, cKSplit, and cPSquare.
| virtual void cStdDev::parsimPack | ( | cCommBuffer * | buffer | ) | [virtual] |
Serializes the object into an MPI send buffer.
Used by the simulation kernel for parallel execution. See cObject for more details.
Reimplemented from cStatistic.
Reimplemented in cDensityEstBase, cHistogramBase, cEqdHistogramBase, cKSplit, cPSquare, cWeightedStdDev, and cVarHistogram.
| virtual void cStdDev::parsimUnpack | ( | cCommBuffer * | buffer | ) | [virtual] |
Deserializes the object from an MPI receive buffer Used by the simulation kernel for parallel execution.
See cObject for more details.
Reimplemented from cStatistic.
Reimplemented in cDensityEstBase, cHistogramBase, cEqdHistogramBase, cKSplit, cPSquare, cWeightedStdDev, and cVarHistogram.
| virtual void cStdDev::collect | ( | double | value | ) | [virtual] |
Collects one value.
Implements cStatistic.
Reimplemented in cDensityEstBase, cLongHistogram, and cWeightedStdDev.
Referenced by cWeightedStdDev::collect(), and cDensityEstBase::collect().
| virtual void cStdDev::collect | ( | SimTime | value | ) | [inline, virtual] |
Convenience method, delegates to collect(double).
Reimplemented from cStatistic.
Reimplemented in cDensityEstBase, cLongHistogram, and cWeightedStdDev.
References cStatistic::collect(), and SimTime::dbl().
| virtual void cStdDev::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.
Throws an error if the other object is weighted statistics (see isWeighted()).
Implements cStatistic.
Reimplemented in cDensityEstBase, cKSplit, cPSquare, and cWeightedStdDev.
| virtual bool cStdDev::isWeighted | ( | ) | const [inline, virtual] |
Returns false, because this class does not collect weighted statistics.
Implements cStatistic.
Reimplemented in cWeightedStdDev.
| virtual long cStdDev::getCount | ( | ) | const [inline, virtual] |
| virtual double cStdDev::getSum | ( | ) | const [inline, virtual] |
| virtual double cStdDev::getSqrSum | ( | ) | const [inline, virtual] |
| virtual double cStdDev::getMin | ( | ) | const [inline, virtual] |
| virtual double cStdDev::getMax | ( | ) | const [inline, virtual] |
| virtual double cStdDev::getMean | ( | ) | const [inline, virtual] |
Returns the mean of the observations.
Returns 0.0 if nothing was collected yet.
Implements cStatistic.
Reimplemented in cWeightedStdDev.
| virtual double cStdDev::getStddev | ( | ) | const [virtual] |
| virtual double cStdDev::getVariance | ( | ) | const [virtual] |
Returns the variance of the observations collected.
Implements cStatistic.
Reimplemented in cWeightedStdDev.
| virtual double cStdDev::getWeights | ( | ) | const [inline, virtual] |
Since this is unweighted statistics, the sum of weights is getCount().
Implements cStatistic.
Reimplemented in cWeightedStdDev.
References cStatistic::getCount().
| virtual double cStdDev::getWeightedSum | ( | ) | const [inline, virtual] |
Since this is unweighted statistics, the sum of weight*value products is getSum().
Implements cStatistic.
Reimplemented in cWeightedStdDev.
References cStatistic::getSum().
| virtual double cStdDev::getSqrSumWeights | ( | ) | const [inline, virtual] |
Since this is unweighted statistics, the sum of squared weights is getCount().
Implements cStatistic.
Reimplemented in cWeightedStdDev.
References cStatistic::getCount().
| virtual double cStdDev::getWeightedSqrSum | ( | ) | const [inline, virtual] |
Since this is unweighted statistics, the sum of weight*value*value products is getSqrSum().
Implements cStatistic.
Reimplemented in cWeightedStdDev.
References cStatistic::getSqrSum().
| virtual double cStdDev::random | ( | ) | const [virtual] |
Returns numbers from a normal distribution with the current mean and standard deviation.
Implements cStatistic.
Reimplemented in cLongHistogram, cDoubleHistogram, cKSplit, cPSquare, and cVarHistogram.
| virtual void cStdDev::clearResult | ( | ) | [virtual] |
Clears the results collected so far.
Implements cStatistic.
Reimplemented in cDensityEstBase, cHistogramBase, cWeightedStdDev, and cVarHistogram.
| virtual void cStdDev::saveToFile | ( | FILE * | ) | const [virtual] |
Writes the contents of the object into a text file.
Implements cStatistic.
Reimplemented in cDensityEstBase, cHistogramBase, cEqdHistogramBase, cKSplit, cPSquare, cWeightedStdDev, and cVarHistogram.
| virtual void cStdDev::loadFromFile | ( | FILE * | ) | [virtual] |
Reads the object data from a file written out by saveToFile() (or written by hand).
Implements cStatistic.
Reimplemented in cDensityEstBase, cHistogramBase, cEqdHistogramBase, cKSplit, cPSquare, cWeightedStdDev, and cVarHistogram.
1.5.5