Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members

Accumulator Class Reference
[Useful math tools]

Class to compute simple statistics of a stream of (currently real) numbers. More...

#include <quantum.h>

List of all members.

Public Member Functions

 Accumulator ()
 Default constructor: creates an empty accumulator.
number Sum ()
 Returns the sum of all accumulated samples. $ \sigma = \sum_{i=1}^N{x_i} $ .
number Count ()
 Returns the number of samples accumulated. $ N = \sum_{i=1}^N{1} $ .
number SqSum ()
 Returns the sum of the squares of all accumulated samples: $ \Sigma = \sum_{i=1}^N{x_i^2} $ .
number Mean ()
 Returns the sample mean: $ \overline{x} = \sigma / N$ .
number MeanSq ()
 Returns the mean of the squares: $ \overline{x^2} = \Sigma / N$ .
number RMS ()
 Returns the RMS value: $ x_{\scriptscriptstyle\mathrm{RMS}} = \sqrt{\Sigma / N}$ .
number SampleVariance ()
 Returns the sample variance: $ \Delta^2_{\scriptscriptstyle x} = (\overline{x^2} -\overline{x}^2) / N$ .
number PopVariance ()
 Returns the estimated population variance: $ \Delta^2_{\scriptscriptstyle\mathrm{pop}} = (\overline{x^2} -\overline{x}^2) / (N-1)$ .
number PopStdDev ()
 Returns the estimated standard deviation of the population: $ \Delta_{\scriptscriptstyle\mathrm{pop}} = \sqrt{\Delta^2_{\scriptscriptstyle\mathrm{pop}}}$ .
number StdDevMean ()
 Returns the estimated standard deviation of the mean: $ \Delta \overline{x} = \Delta_{\scriptscriptstyle\mathrm{pop}} / \sqrt{N}$ .
AccumulatorReset ()
 Discards all samples.
Accumulatoroperator+= (number num)
 Adds a sample num to the accumulator.
Accumulatoroperator-= (number num)
 Adds a sample -num to the accumulator. NOTE: does not delete a sample!

Detailed Description

Class to compute simple statistics of a stream of (currently real) numbers.

The Accumulator class is a convenient way to compute certain statistics for a stream of (currently) real numbers. Extending this to other types would be fairly easy. Statistics that can be computed are:

The documentation for this class was generated from the following file:
Generated on Wed Jun 14 22:25:27 2006 for linalg by  doxygen 1.4.4