cWeightedStdDev Class Reference
[Statistical data collection]

#include <cstddev.h>

Inheritance diagram for cWeightedStdDev:

cStdDev cStatistic cOwnedObject cNamedObject cObject

List of all members.


Detailed Description

Statistics class to collect doubles and calculate weighted statistics of them.

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 ()
cWeightedStdDevoperator= (const cWeightedStdDev &res)
Redefined cObject member functions.
virtual cWeightedStdDevdup () 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 *)


Constructor & Destructor Documentation

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.


Member Function Documentation

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]

Creates and returns an exact copy of this object.

See cObject for more details.

Reimplemented from cStdDev.

virtual std::string cWeightedStdDev::info (  )  const [virtual]

Produces a one-line description of the object's contents.

See cObject for more details.

Reimplemented from cStdDev.

virtual void cWeightedStdDev::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 cStdDev.

virtual void cWeightedStdDev::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 cStdDev.

virtual void cWeightedStdDev::collect ( double  value  )  [inline, virtual]

Collects one value.

Reimplemented from cStdDev.

References cStatistic::collect2().

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]

Returns true, because this class collects weighted statistics.

Reimplemented from cStdDev.

virtual void cWeightedStdDev::collect2 ( double  value,
double  weight 
) [virtual]

Collects one value with a given weight.

Reimplemented from cStatistic.

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().

virtual void cWeightedStdDev::collect2 ( SimTime  value,
SimTime  weight 
) [inline, virtual]

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]

Clears the results collected so far.

Reimplemented from cStdDev.

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]

Returns the variance of the observations collected.

Reimplemented from cStdDev.

virtual double cWeightedStdDev::getWeights (  )  const [inline, virtual]

Returns the sum of weights.

Reimplemented from cStdDev.

virtual double cWeightedStdDev::getWeightedSum (  )  const [inline, virtual]

Returns the sum of weight*value products.

Reimplemented from cStdDev.

virtual double cWeightedStdDev::getSqrSumWeights (  )  const [inline, virtual]

Returns the sum of squared weights.

Reimplemented from cStdDev.

virtual double cWeightedStdDev::getWeightedSqrSum (  )  const [inline, virtual]

Returns the sum of weight*value*value products.

Reimplemented from cStdDev.

virtual void cWeightedStdDev::saveToFile ( FILE *   )  const [virtual]

Writes the contents of the object into a text file.

Reimplemented from cStdDev.

virtual void cWeightedStdDev::loadFromFile ( FILE *   )  [virtual]

Reads the object data from a file, in the format written out by saveToFile().

Reimplemented from cStdDev.


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