16 #ifndef __OMNETPP_CPRECOLLDENSITYEST_H 17 #define __OMNETPP_CPRECOLLDENSITYEST_H 19 #include "cabstracthistogram.h" 72 double *precollectedValues;
73 double *precollectedWeights;
78 double rangeExtFactor;
79 double rangeMin, rangeMax;
80 double finiteMinValue = NAN, finiteMaxValue = NAN;
83 int64_t numFiniteUnderflows;
84 int64_t numFiniteOverflows;
87 double finiteUnderflowSumWeights;
88 double finiteOverflowSumWeights;
89 double negInfSumWeights;
90 double posInfSumWeights;
134 virtual void parsimPack(
cCommBuffer *buffer)
const override;
141 virtual void parsimUnpack(
cCommBuffer *buffer)
override;
154 virtual void collect(
double value)
override;
162 virtual void collectWeighted(
double value,
double weight)
override;
171 virtual void merge(
const cStatistic *other)
override;
176 virtual void clear()
override;
181 virtual void saveToFile(FILE *)
const override;
186 virtual void loadFromFile(FILE *)
override;
196 virtual void setRange(
double lower,
double upper);
209 virtual void setRangeAuto(
int numPrecollect=100,
double rangeExtensionFactor=2.0);
218 virtual void setRangeAutoLower(
double upper,
int numPrecollect=100,
double rangeExtensionFactor=2.0);
227 virtual void setRangeAutoUpper(
double lower,
int numPrecollect=100,
double rangeExtensionFactor=2.0);
233 virtual void setNumPrecollectedValues(
int numPrecollect);
255 virtual void setupRange();
263 virtual void collectIntoHistogram(
double value) = 0;
271 virtual void collectWeightedIntoHistogram(
double value,
double weight) = 0;
285 virtual int64_t
getNumUnderflows()
const override {
return numFiniteUnderflows + numNegInfs;}
291 virtual int64_t
getNumOverflows()
const override {
return numFiniteOverflows + numPosInfs;}
virtual void collect(double value)=0
Interface and base class for histogram-like density estimation classes.
Definition: cabstracthistogram.h:26
virtual double getNegInfSumWeights() const override
Definition: cprecolldensityest.h:316
virtual int64_t getNumOverflows() const override
Definition: cprecolldensityest.h:291
cPrecollectionBasedDensityEst(const cPrecollectionBasedDensityEst &other)
Definition: cprecolldensityest.h:106
virtual double getRangeExtensionFactor() const
Definition: cprecolldensityest.h:245
virtual int64_t getNumPosInfs() const override
Definition: cprecolldensityest.h:311
RangeMode
Constants for histogram range_mode.
Definition: cprecolldensityest.h:61
virtual void collectWeighted(double value, double weight)
Buffer for the communications layer of parallel simulation.
Definition: ccommbuffer.h:41
virtual double getOverflowSumWeights() const override
Definition: cprecolldensityest.h:301
virtual int getNumPrecollectedValues() const
Definition: cprecolldensityest.h:239
virtual int64_t getNumNegInfs() const override
Definition: cprecolldensityest.h:306
Definition: cabstracthistogram.h:21
virtual double getUnderflowSumWeights() const override
Definition: cprecolldensityest.h:296
virtual bool binsAlreadySetUp() const override
Definition: cprecolldensityest.h:279
Base class for histogram-like density estimation classes.
Definition: cprecolldensityest.h:55
virtual double getPosInfSumWeights() const override
Definition: cprecolldensityest.h:321
virtual int64_t getNumUnderflows() const override
Definition: cprecolldensityest.h:285
cStatistic is an abstract class for computing statistical properties of a random variable.
Definition: cstatistic.h:34