|
Boost : |
From: Jeremy Siek (jsiek_at_[hidden])
Date: 2002-02-07 21:12:28
Sounds cool...
BTW, was this in the VTL? There's probably a few more iterators in the VTL
that aren't in the iterator adaptor library yet. Anyone want to make that
happen?
Cheers,
Jeremy
On Fri, 8 Feb 2002, rogeeff wrote:
rogeef> Hi,
rogeef>
rogeef> I recently meet the need for joining iterator, i.e. iterator that
rogeef> traverse through "concatenation" of two collections; first elements
rogeef> of first collection then the second. Inducing example looked like
rogeef> this:
rogeef>
rogeef> Let say we have a storage of objects that need to provide an access
rogeef> to them by integer ID. IDs could not constitute continuous set. But
rogeef> we can insure that tere is a continuous subset of most frequently
rogeef> accessed IDs. So storage implemented as combination of vector and map.
rogeef> Now I need an iterator for this storage that will traverse through
rogeef> all the objects. Here where joining iterator come to use.
rogeef>
rogeef> Implementation and test module are located here:
rogeef>
rogeef> http://groups.yahoo.com/group/boost/files/Joining%20Iterator%
rogeef> 20Adaptor/
rogeef>
rogeef> If boosters will find it intersting and reusable I could also provide
rogeef> example and docs.
rogeef>
rogeef> There is one small flaw with current implementation: it could lie
rogeef> sometimes about resulting iterator category. Does anybody know
rogeef> elegant way to deduce most restrictive category of two provided?
rogeef>
rogeef>
rogeef> Gennadiy.
rogeef>
rogeef>
rogeef>
rogeef> Info: http://www.boost.org Send unsubscribe requests to: <mailto:boost-unsubscribe_at_[hidden]>
rogeef>
rogeef> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
rogeef>
rogeef>
----------------------------------------------------------------------
Jeremy Siek http://php.indiana.edu/~jsiek/
Ph.D. Student, Indiana Univ. B'ton email: jsiek_at_[hidden]
C++ Booster (http://www.boost.org) office phone: (812) 855-3608
----------------------------------------------------------------------
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk