|
OMNeT++ API 6.1
Discrete Event Simulation Library
|
|
16 #ifndef __OMNETPP_CPRECOLLDENSITYEST_H
17 #define __OMNETPP_CPRECOLLDENSITYEST_H
19 #include "cabstracthistogram.h"
71 bool transformed =
false;
72 double *precollectedValues =
nullptr;
73 double *precollectedWeights =
nullptr;
74 int numPrecollected = 100;
77 RangeMode rangeMode = RANGE_AUTO;
78 double rangeExtFactor = 2.0;
79 double rangeMin = 0, rangeMax = 0;
80 double finiteMinValue = NAN, finiteMaxValue = NAN;
83 int64_t numFiniteUnderflows = 0;
84 int64_t numFiniteOverflows = 0;
85 int64_t numNegInfs = 0;
86 int64_t numPosInfs = 0;
87 double finiteUnderflowSumWeights = 0;
88 double finiteOverflowSumWeights = 0;
89 double negInfSumWeights = 0;
90 double posInfSumWeights = 0;
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 int getNumPrecollectedValues() const
Definition: cprecolldensityest.h:239
virtual int64_t getNumNegInfs() const override
Definition: cprecolldensityest.h:306
cPrecollectionBasedDensityEst(const cPrecollectionBasedDensityEst &other)
Definition: cprecolldensityest.h:106
virtual void collectWeighted(double value, double weight)
RangeMode
Constants for histogram range_mode.
Definition: cprecolldensityest.h:61
virtual int64_t getNumUnderflows() const override
Definition: cprecolldensityest.h:285
virtual double getPosInfSumWeights() const override
Definition: cprecolldensityest.h:321
virtual int64_t getNumOverflows() const override
Definition: cprecolldensityest.h:291
virtual void collect(double value)=0
Base class for histogram-like density estimation classes.
Definition: cprecolldensityest.h:55
Interface and base class for histogram-like density estimation classes.
Definition: cabstracthistogram.h:26
cStatistic is an abstract class for computing statistical properties of a random variable.
Definition: cstatistic.h:34
virtual double getNegInfSumWeights() const override
Definition: cprecolldensityest.h:316
virtual double getRangeExtensionFactor() const
Definition: cprecolldensityest.h:245
virtual int64_t getNumPosInfs() const override
Definition: cprecolldensityest.h:311
virtual bool binsAlreadySetUp() const override
Definition: cprecolldensityest.h:279
virtual double getOverflowSumWeights() const override
Definition: cprecolldensityest.h:301
Buffer for the communications layer of parallel simulation.
Definition: ccommbuffer.h:41
virtual double getUnderflowSumWeights() const override
Definition: cprecolldensityest.h:296