cStdDev Class Reference
[Statistical data collection]

#include <cstddev.h>

Inheritance diagram for cStdDev:

cStatistic cOwnedObject cNamedObject cObject cDensityEstBase cWeightedStdDev cHistogramBase cKSplit cPSquare cHistogram cVarHistogram cDoubleHistogram cLongHistogram

List of all members.


Detailed Description

Statistics class to collect min, max, mean, and standard deviation.

Public Member Functions

Constructors, destructor, assignment.
 cStdDev (const cStdDev &r)
 cStdDev (const char *name=NULL)
virtual ~cStdDev ()
cStdDevoperator= (const cStdDev &res)
Redefined cObject member functions.
virtual cStdDevdup () 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 *)

Constructor & Destructor Documentation

cStdDev::cStdDev ( const cStdDev r  )  [inline]

Copy constructor.

cStdDev::cStdDev ( const char *  name = NULL  )  [explicit]

Constructor.

virtual cStdDev::~cStdDev (  )  [inline, virtual]

Destructor.


Member Function Documentation

cStdDev& cStdDev::operator= ( const cStdDev res  ) 

Assignment operator.

The name member is not copied; see cNamedObject's operator=() for more details.

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, cHistogram, 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, cHistogram, 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]

Returns the number of observations collected.

Implements cStatistic.

virtual double cStdDev::getSum (  )  const [inline, virtual]

Returns the sum of the values.

Implements cStatistic.

virtual double cStdDev::getSqrSum (  )  const [inline, virtual]

Returns the squared sum of the collected values.

Implements cStatistic.

virtual double cStdDev::getMin (  )  const [inline, virtual]

Returns the minimum of the collected values.

Implements cStatistic.

virtual double cStdDev::getMax (  )  const [inline, virtual]

Returns the maximum of the collected values.

Implements cStatistic.

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]

Returns the standard deviation of the observations.

Implements cStatistic.

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 cHistogram, 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, cHistogram, 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, cHistogram, cKSplit, cPSquare, cWeightedStdDev, and cVarHistogram.


The documentation for this class was generated from the following file:

Generated on Wed Apr 3 14:40:28 2013 for OMNeT++ Simulation Library by  doxygen 1.5.5