|
Boost : |
From: Neal D. Becker (ndbecker2_at_[hidden])
Date: 2004-04-14 09:11:32
Here is an update to cycle_iterator. This is based on the original design
by Gennadiy Rozental. After fairly extensive performance testing I am
getting good results (compared to my old implementation which was
hand-written, not based on boost iterators), after adding operator[].
There are two versions, both give about the same performance in my tests.
One version, which I prefer, modifies the underlying base iterator for
operations such as increment. The other implementation never touches the
base iterator, but modifies an integral offset value.
Also included is a Ring container adaptor class, which adapts a container
(e.g., std::vector) to a ring. Basic operations are there, but more can be
added.
Also a simple test program.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk