#include <probehistogram.h>
Inherits Probe.
Inheritance diagram for ProbeHistogram:
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. |
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 (
),
(
) and
(
), where
is the value of bin
, as is the number of observed values falling in the
-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 =
# Square Mean =
# Variance =
# BinWidth = your bin width
# BinStart = your bin start
start of bin 0 TAB TAB
TAB
TAB
start of bin 1 TAB TAB
TAB
TAB
etc.
|
|