
Boost.Bimap is ready for review. Here is the overview: With Boost.Bimap you can create associative containers in which both types can be used as key. A bimap<X,Y> can be thought of as a combination of a std::map<X,Y> and a std::map<Y,X>. The learning curve of bimap is almost flat if you know how to use standard containers. A great deal of effort has been put into mapping the naming scheme of the STL in Boost.Bimap. The library is designed to match the common STL containers. The project main page can be found here http://cablemodem.fibertel.com.ar/mcape/oss/projects/mc_projects/boost_proje... The sources have been upload to the Boost Vault too. http://boost-consulting.com/vault/index.php?direction=0&order=&directory=Containers& This library is the result of one of the ten Boost SoC projects. I was mentored by Joaquin López Muñoz, and he has been helping me to reach this point. (Thanks again!) An informal review was requested near the end of the SoC. The complete thread can be found here: http://archives.free.net.ph/message/20060809.053203.807d803b.en.html Changes since SoC dead-line: * New set_of type: unconstrained_set_of. Now it is possible to build standard unidirectional maps between the new framework. * Mutable data while iterating. In the case of non key-based set_of types (list_of, vector_of and unconstrained_set_of) the associated data of that side can be modified directly using iterators. * Internal reworking to simplify things. * More tests. * Proof-read docs. (Thanks Paul Giaccone!) Best regards Matias Capeletto

Could you mention how this is different from using multi index to do the same thing? http://www.boost.org/libs/multi_index/doc/examples.html#example4 I'd expect a bimap to be some sort of typedef -----Original Message----- From: boost-bounces@lists.boost.org on behalf of Matias Capeletto Sent: Sun 11/19/2006 12:25 PM To: boost@lists.boost.org Subject: [boost] Formal Review Request: Boost.Bimap Boost.Bimap is ready for review. Here is the overview: With Boost.Bimap you can create associative containers in which both types can be used as key. A bimap<X,Y> can be thought of as a combination of a std::map<X,Y> and a std::map<Y,X>. The learning curve of bimap is almost flat if you know how to use standard containers. A great deal of effort has been put into mapping the naming scheme of the STL in Boost.Bimap. The library is designed to match the common STL containers. The project main page can be found here http://cablemodem.fibertel.com.ar/mcape/oss/projects/mc_projects/boost_proje... The sources have been upload to the Boost Vault too. http://boost-consulting.com/vault/index.php?direction=0&order=&directory=Containers& This library is the result of one of the ten Boost SoC projects. I was mentored by Joaquin López Muñoz, and he has been helping me to reach this point. (Thanks again!) An informal review was requested near the end of the SoC. The complete thread can be found here: http://archives.free.net.ph/message/20060809.053203.807d803b.en.html Changes since SoC dead-line: * New set_of type: unconstrained_set_of. Now it is possible to build standard unidirectional maps between the new framework. * Mutable data while iterating. In the case of non key-based set_of types (list_of, vector_of and unconstrained_set_of) the associated data of that side can be modified directly using iterators. * Internal reworking to simplify things. * More tests. * Proof-read docs. (Thanks Paul Giaccone!) Best regards Matias Capeletto _______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

Bad form to reply to my own email, but anyway: I've now gone through a bit of the thread you referenced below. It seems like the biggest benefit is an easier interface. Given that this is a good enough reason for most people, would it not be possible to share code with multi index? Perhaps by private inheritance or aggregation? I'd suspect that there is likely to be code duplication otherwise. -----Original Message----- From: Sohail Somani Sent: Sun 11/19/2006 1:01 PM To: boost@lists.boost.org; boost@lists.boost.org Subject: RE: [boost] Formal Review Request: Boost.Bimap Could you mention how this is different from using multi index to do the same thing? http://www.boost.org/libs/multi_index/doc/examples.html#example4 I'd expect a bimap to be some sort of typedef -----Original Message----- From: boost-bounces@lists.boost.org on behalf of Matias Capeletto Sent: Sun 11/19/2006 12:25 PM To: boost@lists.boost.org Subject: [boost] Formal Review Request: Boost.Bimap Boost.Bimap is ready for review. Here is the overview: With Boost.Bimap you can create associative containers in which both types can be used as key. A bimap<X,Y> can be thought of as a combination of a std::map<X,Y> and a std::map<Y,X>. The learning curve of bimap is almost flat if you know how to use standard containers. A great deal of effort has been put into mapping the naming scheme of the STL in Boost.Bimap. The library is designed to match the common STL containers. The project main page can be found here http://cablemodem.fibertel.com.ar/mcape/oss/projects/mc_projects/boost_proje... The sources have been upload to the Boost Vault too. http://boost-consulting.com/vault/index.php?direction=0&order=&directory=Containers& This library is the result of one of the ten Boost SoC projects. I was mentored by Joaquin López Muñoz, and he has been helping me to reach this point. (Thanks again!) An informal review was requested near the end of the SoC. The complete thread can be found here: http://archives.free.net.ph/message/20060809.053203.807d803b.en.html Changes since SoC dead-line: * New set_of type: unconstrained_set_of. Now it is possible to build standard unidirectional maps between the new framework. * Mutable data while iterating. In the case of non key-based set_of types (list_of, vector_of and unconstrained_set_of) the associated data of that side can be modified directly using iterators. * Internal reworking to simplify things. * More tests. * Proof-read docs. (Thanks Paul Giaccone!) Best regards Matias Capeletto _______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

On 11/19/06, Sohail Somani <s.somani@fincad.com> wrote:
Could you mention how this is different from using multi index to do the same thing?
http://www.boost.org/libs/multi_index/doc/examples.html#example4
I'd expect a bimap to be some sort of typedef Bad form to reply to my own email, but anyway:
I've now gone through a bit of the thread you referenced below. It seems like the biggest benefit is an easier interface. Given that this is a good enough reason for most people, would it not be possible to share code with multi index? Perhaps by private inheritance or aggregation?
I'd suspect that there is likely to be code duplication otherwise.
Boost.MultiIndex is the core of Boost.Bimap. There is no code duplication. Please read this part of the docs: http://cablemodem.fibertel.com.ar/mcape/boost/libs/bimap/boost_bimap/bimap_a... Best Regards Matias Capeletto

Hi Matias, I have received your request and will add Bimap to the review queue. Cheers, ron On Nov 19, 2006, at 3:25 PM, Matias Capeletto wrote:
Boost.Bimap is ready for review. Here is the overview:
With Boost.Bimap you can create associative containers in which both types can be used as key. A bimap<X,Y> can be thought of as a combination of a std::map<X,Y> and a std::map<Y,X>. The learning curve of bimap is almost flat if you know how to use standard containers. A great deal of effort has been put into mapping the naming scheme of the STL in Boost.Bimap. The library is designed to match the common STL containers.
The project main page can be found here http://cablemodem.fibertel.com.ar/mcape/oss/projects/mc_projects/ boost_projects/boost_bimap.html
The sources have been upload to the Boost Vault too. http://boost-consulting.com/vault/index.php? direction=0&order=&directory=Containers&
This library is the result of one of the ten Boost SoC projects. I was mentored by Joaquin López Muñoz, and he has been helping me to reach this point. (Thanks again!) An informal review was requested near the end of the SoC. The complete thread can be found here: http://archives.free.net.ph/message/20060809.053203.807d803b.en.html
Changes since SoC dead-line: * New set_of type: unconstrained_set_of. Now it is possible to build standard unidirectional maps between the new framework. * Mutable data while iterating. In the case of non key-based set_of types (list_of, vector_of and unconstrained_set_of) the associated data of that side can be modified directly using iterators. * Internal reworking to simplify things. * More tests. * Proof-read docs. (Thanks Paul Giaccone!)
Best regards Matias Capeletto _______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/ listinfo.cgi/boost
participants (3)
-
Matias Capeletto
-
Ronald Garcia
-
Sohail Somani