Use of Boost Bimap in C++
Asked Answered
S

1

7

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!

Shutout answered 8/8, 2010 at 22:30 Comment(1)
It depends on the collection type you're accessing through. Without the type definition it's impossible to say. In general I believe that the individual collection types have the same runtime complexities as their "standalone implementation" counterparts.Therapeutic
P
6

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

Portable answered 8/8, 2010 at 23:39 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.