OMNeT++ Simulation Library
6.0.3
|
#include <cabstracthistogram.h>
Interface and base class for histogram-like density estimation classes.
Classes | |
struct | Bin |
Information about a histogram bin. This struct is not used internally by the histogram classes, only to return information to the user. More... | |
Public Member Functions | |
Constructors, destructor, assignment. | |
cAbstractHistogram (const cAbstractHistogram &other)=default | |
cAbstractHistogram (const char *name=nullptr, bool weighted=false) | |
virtual | ~cAbstractHistogram () |
cAbstractHistogram & | operator= (const cAbstractHistogram &res) |
virtual cAbstractHistogram * | dup () const override |
Accessing histogram bins. | |
virtual bool | binsAlreadySetUp () const =0 |
virtual void | setUpBins ()=0 |
virtual std::vector< double > | getBinEdges () const |
virtual std::vector< double > | getBinValues () const |
virtual int | getNumBins () const =0 |
virtual double | getBinEdge (int k) const =0 |
virtual double | getBinValue (int k) const =0 |
virtual double | getBinPDF (int k) const |
virtual int64_t | getNumUnderflows () const =0 |
virtual int64_t | getNumOverflows () const =0 |
virtual double | getUnderflowSumWeights () const =0 |
virtual double | getOverflowSumWeights () const =0 |
virtual int64_t | getNumNegInfs () const =0 |
virtual int64_t | getNumPosInfs () const =0 |
virtual double | getNegInfSumWeights () const =0 |
virtual double | getPosInfSumWeights () const =0 |
virtual Bin | getBinInfo (int k) const |
Density and cumulated density approximation functions, random number generation. | |
virtual double | getPDF (double x) const |
virtual double | getCDF (double x) const |
virtual double | draw () const override |
Public Member Functions inherited from cStdDev | |
cStdDev (const cStdDev &r) | |
cStdDev (const char *name=nullptr, bool weighted=false) | |
virtual | ~cStdDev () |
cStdDev & | operator= (const cStdDev &res) |
virtual std::string | str () const override |
virtual void | parsimPack (cCommBuffer *buffer) const override |
virtual void | parsimUnpack (cCommBuffer *buffer) override |
virtual bool | isWeighted () const override |
virtual void | collect (double value) override |
virtual void | collectWeighted (double value, double weight) override |
virtual void | merge (const cStatistic *other) override |
virtual int64_t | getCount () const override |
virtual double | getSum () const override |
virtual double | getSqrSum () const override |
virtual double | getMin () const override |
virtual double | getMax () const override |
virtual double | getMean () const override |
virtual double | getStddev () const override |
virtual double | getVariance () const override |
virtual double | getSumWeights () const override |
virtual double | getWeightedSum () const override |
virtual double | getSqrSumWeights () const override |
virtual double | getWeightedSqrSum () const override |
virtual void | clear () override |
virtual void | saveToFile (FILE *) const override |
virtual void | loadFromFile (FILE *) override |
virtual void | collect (double value)=0 |
virtual void | collect (SimTime value) |
virtual void | collectWeighted (double value, double weight) |
virtual void | collectWeighted (SimTime value, double weight) |
virtual void | collectWeighted (double value, SimTime weight) |
virtual void | collectWeighted (SimTime value, SimTime weight) |
Public Member Functions inherited from cStatistic | |
cStatistic (const cStatistic &r) | |
cStatistic (const char *name=nullptr) | |
virtual | ~cStatistic () |
cStatistic & | operator= (const cStatistic &res) |
virtual void | collect (SimTime value) |
virtual void | collectWeighted (SimTime value, double weight) |
virtual void | collectWeighted (double value, SimTime weight) |
virtual void | collectWeighted (SimTime value, SimTime weight) |
virtual void | record () |
virtual void | recordWithUnit (const char *unit) |
virtual void | recordAs (const char *name, const char *unit=nullptr) |
Public Member Functions inherited from cRandom | |
cRandom (cRNG *rng) | |
cRandom (const char *name=nullptr, cRNG *rng=nullptr) | |
virtual | ~cRandom () |
virtual void | setRNG (cRNG *rng) |
cRNG * | getRNG () const |
Public Member Functions inherited from cOwnedObject | |
cOwnedObject () | |
cOwnedObject (const char *name, bool namepooling=true) | |
cOwnedObject (const cOwnedObject &obj) | |
virtual | ~cOwnedObject () |
cOwnedObject & | operator= (const cOwnedObject &o) |
virtual cObject * | getOwner () const override |
virtual bool | isOwnedObject () const override |
Public Member Functions inherited from cNamedObject | |
cNamedObject () | |
cNamedObject (const char *name, bool namepooling=true) | |
cNamedObject (const cNamedObject &obj) | |
virtual | ~cNamedObject () |
cNamedObject & | operator= (const cNamedObject &o) |
virtual void | setName (const char *s) |
virtual const char * | getName () const override |
virtual void | setNamePooling (bool b) |
virtual bool | getNamePooling () |
Public Member Functions inherited from cObject | |
cObject () | |
cObject (const cObject &other)=default | |
virtual | ~cObject () |
virtual const char * | getClassName () const |
bool | isName (const char *s) const |
virtual const char * | getFullName () const |
virtual std::string | getFullPath () const |
virtual std::string | getClassAndFullName () const |
virtual std::string | getClassAndFullPath () const |
const cObject * | getThisPtr () const |
virtual std::ostream & | printOn (std::ostream &os) const |
virtual bool | isSoftOwner () const |
virtual void | forEachChild (cVisitor *v) |
cObject * | findObject (const char *name, bool deep=true) |
virtual cClassDescriptor * | getDescriptor () const |
void | copyNotSupported () const |
Additional Inherited Members | |
Static Public Member Functions inherited from cOwnedObject | |
static long | getTotalObjectCount () |
static long | getLiveObjectCount () |
static void | resetObjectCounters () |
static cSoftOwner * | getOwningContext () |
Protected Member Functions inherited from cObject | |
virtual void | take (cOwnedObject *obj) |
virtual void | drop (cOwnedObject *obj) |
void | dropAndDelete (cOwnedObject *obj) |
|
default |
Copy constructor.
|
inlineexplicit |
Constructor.
|
inlinevirtual |
Destructor.
|
inline |
Assignment operator. The name member is not copied; see cNamedObject::operator=() for details.
References cStdDev::operator=().
|
inlineoverridevirtual |
Creates and returns an exact copy of this object. See cObject for more details.
Reimplemented from cStdDev.
Reimplemented in cKSplit, cHistogram, and cPSquare.
|
pure virtual |
Returns true if histogram is already available. See setUpBins().
Implemented in cPrecollectionBasedDensityEst, cHistogram, and cPSquare.
|
pure virtual |
Sets up histogram bins, possibly based on data collected during a precollection phase. Calling this if the bins are already set up raises an error.
Implemented in cKSplit, cHistogram, and cPSquare.
|
virtual |
Returns the bin edges of the histogram. There is always one more edge than bin, except when the histogram has not been set up yet, in which case both are zero.
Reimplemented in cHistogram.
|
virtual |
Returns the bin values of the histogram. There is always one less bin than edge, except when the histogram has not been set up yet, in which case both are zero.
Reimplemented in cHistogram.
|
pure virtual |
Returns the number of histogram bins.
Implemented in cHistogram, cKSplit, and cPSquare.
|
pure virtual |
Returns the kth histogram bin edge. Legal values for k are 0 through getNumBins(), that is, there's one more edge than the number of bins. getBinEdge(0) returns the lower edge of the first bin, and getBinEdge(getNumBins()) returns the upper edge of the last bin. The lower edge is inclusive, the upper edge is exclusive.
Implemented in cHistogram, cKSplit, and cPSquare.
|
pure virtual |
Returns the total weight of the observations in the k'th bin of the histogram. (In the unweighted case, every observation is regarded as having the weight 1.0.)
Implemented in cHistogram, cKSplit, and cPSquare.
|
virtual |
Returns the estimated value of the Probability Density Function within bin k. This method simply divides the number of observations in bin k with the bin size and the number of total observations collected.
|
pure virtual |
Returns number of observations that were below the histogram range, independent of their weights. This includes the number of collected negative infinities as well.
Implemented in cHistogram, cPrecollectionBasedDensityEst, and cPSquare.
|
pure virtual |
Returns number of observations that were above the histogram range, independent of their weights. This includes the number of collected positive infinities as well.
Implemented in cHistogram, cPrecollectionBasedDensityEst, and cPSquare.
|
pure virtual |
Returns the total weight of the observations that were below the histogram range. This includes the weights of the collected negative infinities as well.
Implemented in cHistogram, cPrecollectionBasedDensityEst, and cPSquare.
|
pure virtual |
Returns the total weight of the observations that were above the histogram range. This includes the weights of the collected positive infinities as well.
Implemented in cHistogram, cPrecollectionBasedDensityEst, and cPSquare.
|
pure virtual |
Returns number of observations that were negative infinity, independent of their weights.
Implemented in cHistogram, cPrecollectionBasedDensityEst, and cPSquare.
|
pure virtual |
Returns number of observations that were positive infinity, independent of their weights.
Implemented in cHistogram, cPrecollectionBasedDensityEst, and cPSquare.
|
pure virtual |
Returns the total weight of the observations that were negative infinity.
Implemented in cHistogram, cPrecollectionBasedDensityEst, and cPSquare.
|
pure virtual |
Returns the total weight of the observations that were positive infinity.
Implemented in cHistogram, cPrecollectionBasedDensityEst, and cPSquare.
|
virtual |
Combines the functionality of getBinEdge(), getBinValue() and getBinPDF() into a single call.
|
virtual |
Returns the estimated value of the Probability Density Function at a given x.
|
virtual |
Returns the estimated value of the Cumulative Density Function at a given x.
|
overridevirtual |