Boost logo

Boost :

From: David B. Held (dheld_at_[hidden])
Date: 2002-10-21 17:32:10


joaquin_at_[hidden] wrote:
> [...]
> A couple of weeks ago I completed a bidirectional map
> library in the spirit of C++ and posted it to CodeProject:
> [...]

I have written a policy-based map using STLport's implementation
as a starting point. It seems to me that your bimap could be
implemented as a policy set of my map framework, which might help
reduce library proliferation. I don't see why one would never
want a multi-bimap. Allowing for unique and non-unique insert
is a policy in my framework, and could be in yours as well.
Also, my map supports indexing, which I see your page refers
to in one of the links. So your bimap could also potentially
benefit from an indexing policy. I'm not sure how your bimap
is implemented, but it seems to me that you would want to
interleave the two sets over the same tree nodes. It could be
possible to generalize map into an arbitrary-arity tuple ordering
container. After all, why not a trimap? I could imagine this
might be a useful way to implement a multi-field key index.

Dave


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