Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Use of Boost Bimap in C++

C++ Boost has Bimap container that is a bidirectional map: http://www.boost.org/doc/libs/1_43_0/libs/bimap/doc/html/index.html

Does anyone know the performance of Boost::bimap? I mean what's the time complexity of accessing an element in the map? Is it as quick as unordered_map access (which is O(1))?

Thanks!

like image 717
user414585 Avatar asked Aug 08 '10 22:08

user414585


1 Answers

AFAIK each different container of this library have different operation complexity relative to the implementation (like for the stl containers). For details necessary to make your choice, read : http://www.boost.org/doc/libs/1_43_0/libs/bimap/doc/html/boost_bimap/the_tutorial/controlling_collection_types.html

like image 103
Klaim Avatar answered Sep 27 '22 17:09

Klaim