Boost logo

Boost :

From: Neal D. Becker (nbecker_at_[hidden])
Date: 2003-04-03 16:15:01


On Thursday 03 April 2003 03:54 pm, Paul A. Bristow wrote:
> I believe this conjecture is correct, but I am still eagerly awaiting 7.1
> :-)
>
> This is quite interesting (though it needs Industrial Strengthening of
> course), and could usefully generate the higher moments and other
> statistical thingys too.

My purpose was only to demonstrate a generic class to do stats for both scalar
and complex types. I don't know if I have time or will-power to turn it into
a real boost submission.

>
> And it makes me wonder if one could use a container like a circular buffer.
> I can think of applications where one would like new data to pour in
> continuously and to look back for mean (weighted Kalmanesque?), perhaps
> only a limited distance. Using a vector or valarray would imply it would
> grow for ever and run out of space eventually. (I think someone else
> suggested something of this sort?)
> Is the STL queue suitable?
>

We have actually seen some nice code for circular buffer, about 6months to 1
year back. I have brought the subject up here a couple of times.

The most promising IMHO is cycle_iterator, which is an adaptor submitted by
Gennadiy Rozental. I believe this is almost ready for a real boost
submission. Last we left it, there were some questions of the semantics of
the "distance" between iterators. In any case, the "distance" between
iterators in a cyclic buffer is fuzzy.

I think the semantics in cyclic_buffer are the ones I prefer. That is, the
distance from A -> B is always interpreted as positive.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk