
Boost : 
From: Neal D. Becker (nbecker_at_[hidden])
Date: 20030401 08:25:35
Here is an example of a class that can compute 2nd order stats that will work
for either scalar or complex types.
It could be made slightly more efficient. It uses abs(), relying on the
"trick" that abs() is defined for both scalar float and complex. It could be
improved by defining our own "norm" function for both scalar float and
complex. (Unfortunately for efficiency, complex norm is defined in terms of
abs, which uses sqrt, on at least some systems (libstdc++)).
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk