Changes between Version 8 and Version 9 of LibrariesUnderConstruction


Ignore:
Timestamp:
Jan 3, 2009, 9:03:29 PM (14 years ago)
Author:
viboes
Comment:

Removing Accummulators.Sliding because Rolling provides them

Legend:

Unmodified
Added
Removed
Modified
  • LibrariesUnderConstruction

    v8 v9  
    316316
    317317---------------------------------------------------------------------------------------------------
    318 == !AccummulatorsExt ==
     318== !Accummulators.Ext ==
    319319 * '''Suggested by:''' Vicente J. Botet Escriba 
    320320 * '''Description:''' Adding sliding, dependable and cyclic accumulators to Boost.Accumulators.
     
    364364operator+()(dependable_accumulator_set<T,F,W>,dependable_accumulator_set<T,F,W>);
    365365}}}
    366 In addition another variant could allow to cumulate on a sliding window, e.g. on the last N cumulated values. There is already a tail accumulator, but I don't know how to define a min_tail accumulator with the current framework. This class could behaves like:
    367 {{{
    368 #!cpp
    369 typedef sliding_accumulator_set <double, ...> sliding_acc_type;
    370 sliding_acc_type c(window=2);
    371 c(1);
    372 c(5);
    373 c(2);
    374 assert(count(c)==3);
    375 assert(sum(c)==7);
    376 assert(min(c)==2);
    377 }}}
    378 We can state the sliding window at compile (template parameter) or run time
    379 (constructor parameter).
    380 {{{
    381 #!cpp
    382 template <std::size Window, typename T, typename F, typename W>
    383 class static_sliding_accumulator_set;
    384 
    385 template <typename T, typename F, typename W>
    386 class sliding_accumulator_set;
    387 }}}
    388 Of course the complexity of the sliding accumulators operations is increased.
     366
    389367Another variant could be also to have a temporary accumulator that cyclically push its current value on another accumulator.
    390 It will also interesting to have a sliding, dependable and cyclic accumulator set. It would be great to integrate these features on a unique class (accumulator_set?) in a clean way.
     368
     369It will also interesting to have a dependable and cyclic accumulator set. It would be great to integrate these features on a unique class (accumulator_set?) in a clean way.
    391370{{{
    392371#!cpp
    393372template <typename T, typename F, typename W,
    394373          typename DependablePolicy,
    395           typename SlicingPolicy,
    396374          typename CyclicPolicy>
    397375class accumulator_set;
     
    472450---------------------------------------------------------------------------------------------------
    473451== Math and numerics ==
    474  * [#AccummulatorsExt AccummulatorsExt]
     452 * [#Accummulators.Ext Accummulators.Ext]
    475453 * [#Boost.Euclid Euclid]
    476454