- Main Page
- Modules
- Classes
- Files
- Directories
- Related Pages

# Statistical data collection

## Detailed Description

OMNeT++ provides a variety of statistical classes.

There are basic classes which compute basic statistics like mean and standard deviation, some classes deal with density estimation, and other classes support automatic detection of the end of a transient, and automatic detection of accuracy of collected statistics.

The two main abstract base classes are cStatistic and cDensityEstBase. Most other classes are mostly polymorphic on these two, which means most functionality in subclasses is available via virtual functions defined in cStatistic and cDensityEstBase. The transient detection and result accuracy classes are derived from the cTransientDetection and cAccuracyDetection abstract base classes.

The classes are:

- cOutVector is used to record vector simulation results (an output vector, containing (time, value) pairs) to file
- cStdDev keeps number of samples, mean, standard deviation, minimum and maximum value etc.
- cWeightedStdDev is similar to cStdDev, but accepts weighted observations. cWeightedStdDev can be used for example to calculate time average. It is the only weighted statistics class.
- cLongHistogram and cDoubleHistogram are descendants of cStdDev and also keep an approximation of the distribution of the observations using equidistant (equal-sized) cell histograms.
- cVarHistogram implements a histogram where cells do not need to be the same size. You can manually add the cell (bin) boundaries, or alternatively, automatically have a partitioning created where each bin has the same number of observations (or as close to that as possible).
- cPSquare is a class that uses the P2 algorithm by Jain and Chlamtac. The algorithm calculates quantiles without storing the observations.
- cKSplit uses a novel, experimental method, based on an adaptive histogram-like algorithm.

Transient and result accuracy detection classes:

- cTDExpandingWindows is a transient detection algorithm which uses the sliding window approach.
- cADByStddev is a result accuracy detection algorithm which works by checking the standard deviation of the observations

Some other classes closely related to the above ones are not listed here explicitly, but you can find them via 'See also' links from their main classes.

## Classes
class | cDensityEstBase
| Common base class for density estimation classes. More...
class | cTransientDetection
| Virtual base class for transient detection classes. More...
class | cAccuracyDetection
| Virtual base class for result accuracy detection classes. More...
class | cTDExpandingWindows
| A transient detection algorithm. More...
class | cADByStddev
| An algorithm for result accuracy detection. More...
class | cHistogramBase
| Base class for histogram classes. More...
class | cEqdHistogramBase
| Base class for equal cell size histograms. More...
class | cLongHistogram
| Equidistant histogram for integers. More...
class | cDoubleHistogram
| Equidistant histogram for doubles. More...
class | cKSplit
| Implements k-split, an adaptive histogram-like density estimation algorithm. More...
class | cOutVector
| Responsible for recording vector simuotation results (an output vector). More...
class | cPSquare
| Implements the P2 algorithm, which calculates quantile values without storing the observations. More...
class | cStatistic
| Base class of different statistic collecting classes. More...
class | cStdDev
| Statistics class to collect min, max, mean, standard deviation. More...
class | cWeightedStdDev
| Statistics class to collect doubles and calculate weighted statistics of them. More...
class | cVarHistogram
| Variable bin size histogram. More...