opPow, opDollar
Andrei Alexandrescu
SeeWebsiteForEmail at erdani.org
Sat Nov 7 09:56:35 PST 2009
Robert Jacques wrote:
> I'd recommend rolling that into a basic statistics struct containing
> common single pass metrics: i.e. sum, mean, variance, min, max, etc.
Well the problem is that if you want to compute several one-pass
statistics in one pass, you'd have to invent means to combine these
functions. That ability is already present in reduce, e.g. reduce(min,
max)(range) yields a pair containing the min and the max element after
exactly one pass through range.
Andrei
More information about the Digitalmars-d
mailing list