Libg++ currently provides two classes for data collection and analysis of the collected data.
Class SampleStatistic
provides a means of accumulating
samples of double
values and providing common sample statistics.
Assume declaration of double x
.
SampleStatistic a;
a.reset();
a += x;
int n = a.samples();
x = a.mean;
x = a.var()
x = a.stdDev()
x = a.min()
x = a.max()
x = a.confidence(int p)
x = a.confidence(double p)
Class SampleHistogram
is a derived class of
SampleStatistic
that supports collection and display of samples
in bucketed intervals. It supports the following in addition to
SampleStatisic
operations.
SampleHistogram h(double lo, double hi, double width);
int n = h.similarSamples(x)
int n = h.inBucket(int i)
int b = h.buckets()
h.printBuckets(ostream s)
double bound = h.bucketThreshold(int i)
Go to the first, previous, next, last section, table of contents.