|
OMNeT++ API 6.1
Discrete Event Simulation Library
|
|
16 #ifndef __OMNETPP_CSTATISTIC_H
17 #define __OMNETPP_CSTATISTIC_H
21 #include "opp_string.h"
41 _OPP_GNU_ATTRIBUTE(format(scanf, 3, 4))
42 void freadvarsf (FILE *f,
const char *fmt, ...);
82 virtual void parsimPack(
cCommBuffer *buffer)
const override;
89 virtual void parsimUnpack(
cCommBuffer *buffer)
override;
97 virtual bool isWeighted()
const = 0;
102 virtual void collect(
double value) = 0;
112 virtual void collectWeighted(
double value,
double weight);
134 virtual void merge(
const cStatistic *other) = 0;
140 virtual void clear() = 0;
149 virtual int64_t getCount()
const = 0;
156 virtual double getSum()
const = 0;
163 virtual double getSqrSum()
const = 0;
168 virtual double getMin()
const = 0;
173 virtual double getMax()
const = 0;
178 virtual double getMean()
const = 0;
183 virtual double getStddev()
const = 0;
188 virtual double getVariance()
const = 0;
196 virtual double getSumWeights()
const = 0;
201 virtual double getWeightedSum()
const = 0;
206 virtual double getSqrSumWeights()
const = 0;
211 virtual double getWeightedSqrSum()
const = 0;
221 virtual void saveToFile(FILE *)
const = 0;
227 virtual void loadFromFile(FILE *) = 0;
239 virtual void record() {recordAs(
nullptr,
nullptr);}
260 virtual void recordAs(
const char *name,
const char *unit=
nullptr);
virtual ~cStatistic()
Definition: cstatistic.h:63
virtual void recordWithUnit(const char *unit)
Definition: cstatistic.h:250
Lightweight string-to-string map, used internally in some parts of OMNeT++.
Definition: opp_string.h:219
Abstract interface for random variate generator classes.
Definition: crandom.h:31
int64_t-based, base-10 fixed-point simulation time.
Definition: simtime.h:66
virtual void collectWeighted(double value, SimTime weight)
Definition: cstatistic.h:122
double dbl() const
Definition: simtime.h:346
cStatistic is an abstract class for computing statistical properties of a random variable.
Definition: cstatistic.h:34
virtual void record()
Definition: cstatistic.h:239
virtual void collectWeighted(SimTime value, SimTime weight)
Definition: cstatistic.h:127
virtual void collect(SimTime value)
Definition: cstatistic.h:107
Buffer for the communications layer of parallel simulation.
Definition: ccommbuffer.h:41
virtual void collectWeighted(SimTime value, double weight)
Definition: cstatistic.h:117