From: Matias Capeletto (matias.capeletto_at_[hidden])
Date: 2007-02-20 11:54:32
On 2/20/07, Matthias Schabel <boost_at_[hidden]> wrote:
> > bimap<X,Y> bm;
> > bm.left // --> map<X,Y> : X first, Y second
> > bm.right // --> map<Y,X> : Y first, X second
> You may want to consider the nomenclature "forward" and "reverse" -
> for directories,
> this is the standard way of referring to, for example, look-up of a
> telephone number
> from a name and look-up of a name from a telephone number,
> respectively. Reverse
> also indicates that the order of the template arguments are reversed
> in that case
> relative to the order in which they are declared.
Yes, it can be considered. Joaquin in his original bimap use to/from,
that was another possibility.
The good thing about left/right is that it can be used in the naming
of the relation too. So we keep the number of new words to learn.
Other strong point is that left and right are smaller than forward and
But again, the idea is to use words that express the symmetry of the
bidirectional mapping. The left and right views are equally important.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk