ProbeHistogram Class Reference
[Probes]

Measures the histogram of the observed values, providing raw data, pdf and CDF. More...

#include <probehistogram.h>

Inherits Probe.

Inheritance diagram for ProbeHistogram:

Inheritance graph
[legend]
Collaboration diagram for ProbeHistogram:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 ProbeHistogram (string _theName, double _BinWidth=1, double _BinStart=0.0, bool _isGlobal=false)
virtual void Reset (void)
 [internal] Reset the probe, clearing all its internal counters and starting a new output file.
virtual void Zap (double)
 [internal] Reset the probe, clearing all its internal counters. The meaning of the parameter is probe-dependant.
virtual void Observe (double value)
 Observe a value, actual use of the value is probe-dependant.
virtual void WriteToFile (double time)
 [internal] Write the probe statistics to the output file. It is called periodically by NePSing.

Detailed Description

Measures the histogram of the observed values, providing raw data, pdf and CDF.

This probe automatically generates an histogram of the observed values, grouped in bins.

The number of the bins is automatically expanded, so it is unnecessary to define them a-priori. Each bin width and the bin start (i.e., if the bins are zero-centered or not) can be specified in the probe constructor. Note that to have a zero-centered histogram (i.e., where the central bin is centered in zero), BinStart must be equal to BinWidth/2.

The probe output contains the $pdf_i$ ($val[i]/(N \, BinWidth)$), $CDF_i$ ($\sum_{j=-\infty}^i val[j]/(N BinWidth)$) and $Raw-CDF_i$ ($\sum_{j=-\infty}^i val[j]$), where $val[i]$ is the value of bin $i$, as is the number of observed values falling in the $i$-th bin.

Since this probe can generate a huge quantity of data, the data are not appended to the output file. Hence, the output file contains always the last generated histogram.

The output file format is slightly different than the standard one, being:

# time = Time of the output

# N = number of observations

# Mean = $\overline{x} = E[x]$

# Square Mean = $\overline{x^2} = E[x^2]$

# Variance = $E[(x-\overline{x})^2]$

# BinWidth = your bin width

# BinStart = your bin start

start of bin 0 TAB $pdf_0$ TAB $val[0]$ TAB $CDF_0$ TAB $Raw-CDF_0$

start of bin 1 TAB $pdf_1$ TAB $val[1]$ TAB $CDF_1$ TAB $Raw-CDF_1$

etc.


Constructor & Destructor Documentation

ProbeHistogram::ProbeHistogram string  _theName,
double  _BinWidth = 1,
double  _BinStart = 0.0,
bool  _isGlobal = false
 

Parameters:
_theName  the name of the probe
_BinWidth  the width of each bin
_BinStart  the start of the bins
_isGlobal  INTERNAL, do NOT override


The documentation for this class was generated from the following file:
Generated on Wed Dec 22 23:23:49 2004 for NePSing by doxygen 1.3.9.1 ---- Hosted by SourceForge.net Logo