bimap

Java: Instantiate Google Collection's HashBiMap

I'm using Eclipse, and I've added google-collect.1.0-rc2.jar as a referenced library. Yet somehow this still doesn't work: import com.google.common.collect.HashBiMap; public class Odp { //... HashBiMap<Character, Integer> charOcc = HashBiMap<Character, Integer>.create(); } Eclipse gives the following erro...

To instantiate BiMap Of google-collections in Java

How can you instantiate a Bimap of Google-collections? I know the thread. A sample of my code import com.google.common.collect.BiMap; public class UserSettings { private Map<String, Integer> wordToWordID; UserSettings() { this.wordToWordID = new BiMap<String. Integer>(); I get cannot instantiate the type BiMap<String, Intege...

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! ...