16 #ifndef __OMNETPP_CLEGACYHISTOGRAM_H 17 #define __OMNETPP_CLEGACYHISTOGRAM_H 20 #include "cprecolldensityest.h" 22 #if defined(__clang__) || defined(__GNUC__) 23 #pragma GCC diagnostic push 24 #pragma GCC diagnostic ignored "-Wdeprecated-declarations" 85 virtual void parsimPack(
cCommBuffer *buffer)
const override;
92 virtual void parsimUnpack(
cCommBuffer *buffer)
override;
101 virtual void clear()
override;
107 virtual void setUpBins()
override;
112 virtual int getNumBins()
const override;
117 virtual void saveToFile(FILE *)
const override;
122 virtual void loadFromFile(FILE *)
override;
131 virtual void setNumCells(
int numcells);
197 enum Mode {MODE_AUTO, MODE_INTEGERS, MODE_DOUBLES};
198 typedef Mode HistogramMode;
208 virtual void setupRangeInteger();
209 virtual void setupRangeDouble();
210 virtual void getAttributesToRecord(
opp_string_map& attributes)
override;
224 explicit cLegacyHistogram(
const char *name=
nullptr,
int numcells=-1, Mode mode=MODE_AUTO,
bool weighted=
false);
242 virtual void parsimPack(
cCommBuffer *buffer)
const override;
249 virtual void parsimUnpack(
cCommBuffer *buffer)
override;
257 virtual void collectIntoHistogram(
double value)
override;
263 virtual void collectWeightedIntoHistogram(
double value,
double weight)
override;
269 virtual void setupRange()
override;
278 virtual double getBinEdge(
int k)
const override;
283 virtual double getBinValue(
int k)
const override;
288 virtual double getPDF(
double x)
const override;
293 virtual double getCDF(
double x)
const override;
302 virtual double draw()
const override;
307 virtual void saveToFile(FILE *)
const override;
312 virtual void loadFromFile(FILE *)
override;
321 virtual void setMode(Mode mode);
333 virtual void setCellSize(
double d);
371 explicit cLongHistogram(
const char *name=
nullptr,
int numcells=-1,
bool weighted=
false) :
439 explicit cDoubleHistogram(
const char *name=
nullptr,
int numcells=-1,
bool weighted=
false) :
466 #if defined(__clang__) || defined(__GNUC__) 467 #pragma GCC diagnostic pop virtual void collect(SimTime value) override
Definition: clegacyhistogram.h:408
int64_t-based, base-10 fixed-point simulation time.
Definition: simtime.h:66
virtual void collect(double value) override
Definition: clegacyhistogram.h:403
Implements an equidistant histogram.
Definition: clegacyhistogram.h:194
Base class for histogram classes. It adds a vector of counters to cPrecollectionBasedDensityEst.
Definition: clegacyhistogram.h:37
virtual void collect(double value) override
virtual double getCellSize() const
Definition: clegacyhistogram.h:339
Equidistant histogram for integers.
Definition: clegacyhistogram.h:355
Equidistant histogram for doubles.
Definition: clegacyhistogram.h:422
double dbl() const
Definition: simtime.h:301
virtual Mode getMode() const
Definition: clegacyhistogram.h:327
cLegacyHistogramBase(const cLegacyHistogramBase &r)
Definition: clegacyhistogram.h:57
cDoubleHistogram(const cDoubleHistogram &r)
Definition: clegacyhistogram.h:434
Buffer for the communications layer of parallel simulation.
Definition: ccommbuffer.h:41
Lightweight string-to-string map, used internally in some parts of OMNeT++.
Definition: opp_string.h:200
cDoubleHistogram(const char *name=nullptr, int numcells=-1, bool weighted=false)
Definition: clegacyhistogram.h:439
cLongHistogram(const char *name=nullptr, int numcells=-1, bool weighted=false)
Definition: clegacyhistogram.h:371
virtual ~cLongHistogram()
Definition: clegacyhistogram.h:377
cLongHistogram(const cLongHistogram &r)
Definition: clegacyhistogram.h:366
Definition: cabstracthistogram.h:21
virtual cDoubleHistogram * dup() const override
Definition: clegacyhistogram.h:460
virtual ~cDoubleHistogram()
Definition: clegacyhistogram.h:445
Base class for histogram-like density estimation classes.
Definition: cprecolldensityest.h:55
cLegacyHistogram(const cLegacyHistogram &r)
Definition: clegacyhistogram.h:219
virtual cLongHistogram * dup() const override
Definition: clegacyhistogram.h:392