Boost logo

Boost Users :

Subject: [Boost-users] [Accumulators] Are all statistics lazily evaluated by default?
From: pete_at_[hidden]
Date: 2009-05-11 05:51:42


        I really like the range of statistical properties that the
accumulators library supports but am a little unclear about the
laziness properties of the library.

        Suppose I wish to offer a interface that lets the user send a bunch
of data and request the k-th moments where k is specified by the user
at runtime. Will the accumulator_set

        accumulator_set< value_type , ba::tag::moments > acc;

        where k_max >= k (but the inequality may be strict) be efficient.
I.e. I only do the calculations necessary to get the k-th moment not
the k-max-th? The reason I ask is the documentation makes a
distinction between variance and lazy_variance, but this distinction
does not seem to be made for other statistics.

        Thanks in advance for any assistance,


Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at