|
Boost : |
From: Paul A. Bristow (boost_at_[hidden])
Date: 2003-04-02 14:57:55
Sadly (but perhaps not too surpringly) this does not seem to work for MSVC 7.0
with complex. (OK without)
A full working example with at least a few comments might sell this better?
Paul
Paul A Bristow, Prizet Farmhouse, Kendal, Cumbria, LA8 8AB UK
+44 1539 561830 Mobile +44 7714 33 02 04
Mobile mailto:pabristow_at_[hidden]
mailto:pbristow_at_[hidden]
> -----Original Message-----
> From: boost-bounces_at_[hidden]
> [mailto:boost-bounces_at_[hidden]]On Behalf Of Neal D. Becker
> Sent: Tuesday, April 01, 2003 2:26 PM
> To: boost_at_[hidden]
> Subject: [boost] Statistics code example
>
>
> 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