[accumulators] Help with accumulator-based typedef
Hello, I am trying to setup a "simple" weighted_mean accumulator for a struct I want to accumulate. It goes something like this. Let's call it a float for sake of example. It's actually a struct with mathematical comprehension: addable, subtractable, multipliable, dividable, and so on. typedef accumulator_set<float, stats<tag::rolling_mean>, features<tag::count, tag::weighted_mean> > my_float_accumulator_set; However, I am getting obscenely long errors complaining about AccumulatorSet, etc, etc. Can someone direct me to a (somewhat) complete example of a weighted_sum accumulator in action? Am I even on the right track type-defining my accumulator ahead of time? Regards, Michael Powell
Perhaps I should preface this somewhat, I am pretty much a Boost.Accumulators virgin. Vaguely aware of them, they are there. Definitely a notice at wiring them up for practical use. Although it seems compelling that I might be able to use them for this application. Thank ye... On Sun, Sep 8, 2013 at 9:51 PM, Michael Powell <mwpowellhtx@gmail.com> wrote:
Hello,
I am trying to setup a "simple" weighted_mean accumulator for a struct I want to accumulate. It goes something like this. Let's call it a float for sake of example. It's actually a struct with mathematical comprehension: addable, subtractable, multipliable, dividable, and so on.
typedef accumulator_set<float, stats<tag::rolling_mean>, features<tag::count, tag::weighted_mean> > my_float_accumulator_set;
Changing my tact a bit, would someone tell me what it means for BOOST_ACCUMULATORS_DOXYGEN_INVOKED to be defined? For instance, if I instead define my accumulator to look something like this: typedef accumulator_set<dchem::drivers::accel::accelerometer_data_t, stats<tag::rolling_mean> > accelerometer_data_accumulator_set; However, when I initialize its ctor, I would like to specify the tag::rolling_window::window_size, but this appears to be enabled with the DOXYGEN #ifdef? I'm sure there's a reason why, but why not just have the declaration there, no #ifdef?
However, I am getting obscenely long errors complaining about AccumulatorSet, etc, etc. Can someone direct me to a (somewhat) complete example of a weighted_sum accumulator in action? Am I even on the right track type-defining my accumulator ahead of time?
Regards,
Michael Powell
participants (1)
-
Michael Powell