bimap Questions

6

Solved

I am trying to reverse a Map in Kotlin. So far, I have come up with: mapOf("foo" to 42) .toList() .map { (k, v) -> v to k } .toMap() Is there any better way of doing this without using a m...
Zaratite asked 28/7, 2017 at 18:36

5

Solved

is there a bidirectional hashmap for kotlin? If not - what is the best way to express this in kotlin? Including guava to get the BiMap from there feels like shooting with a very big gun on a very ...
Pillow asked 2/4, 2016 at 13:17

1

Does Racket have a bidirectional hashmap? That is, a hash map that can in constant time, be given a key and look up the value, or given the value and look up the key? I would be happy for an API t...
Alphitomancy asked 18/2, 2016 at 2:35

5

Solved

I currently face the problem of java.lang.NoClassDefFoundError: com.google.common.collect.HashBiMap when using guava libraries downloaded from here: http://code.google.com/p/guava-libraries/ I alr...
Divisor asked 29/5, 2012 at 18:45

1

Solved

I wanted to use a multimap version of a boost::bimap and I am following this, Boost::Bimap equivalent of bidirectional multimap This shows how to add and retrieve values in the structure. I am tr...
Magnetics asked 13/2, 2017 at 16:44

6

Solved

I created a simple bidirectional map class that works by internally storing two std::map instances, with opposite key/value types, and providing a user-friendly interface: template<class T1, cla...
Lagan asked 13/2, 2014 at 16:48

1

Solved

This question has been asked before here I admit, but it's now 4 years ago so I dare to ask for an update: I need a way to add a tuple/pair to a container and search for both - the left and the ri...
Kaffir asked 20/2, 2016 at 9:49

1

I have a problem with compiling boost.bimap library. My test program is a blank main function and only one include directive(like #include <boost/bimap.hpp>). After some investigations I fou...
Quietude asked 22/9, 2015 at 8:28

3

Solved

How can you instantiate a Bimap of Google-collections? I've read the question Java: Instantiate Google Collection's HashBiMap A sample of my code import com.google.common.collect.BiMap; pub...
Klaipeda asked 11/3, 2010 at 21:49

1

Solved

As we know, there is the concept of BiMap and MultiMap but is there a MultiBiMap ? so what do I mean by this. In MultiMap you have one-to-many relationship between K and V, a single key can be asso...
Slocum asked 5/12, 2013 at 3:36

2

Solved

First part of the question is that I am trying to use boost::bimap, but from the documentation it is unclear to me how to define a bidirectional multimap. The second part of the question is that I...
Saddleback asked 29/8, 2012 at 9:41

1

Solved

I'm trying to create a simple bi-directional lookup facility for enums in C++. I have one-way lookup working fine... enum MyEnum { One, Two, Three }; const boost::unordered_map<MyEnum,s...
Muntjac asked 24/5, 2012 at 21:37

2

Solved

Short question: Can I typedef a variadic argument pack? I need template <typename ...T> struct Forward { typedef T... args; };. Long version: I was thinking about reimplementing the excel...
Thigpen asked 16/6, 2011 at 11:13

1

Solved

I'm looking to replace a vector<string> and a boost::unordered_map<string, size_t> mapping string to indices in the former with a boost::bimap. What instantiation of bimap should I use...
Uncovered asked 16/11, 2010 at 13:12

2

Solved

Is there a usable alternative to Boost's bimap in C++0x? I would like to avoid Boost, but fully embrace C++11. If necessary, a slimmed down version of Boost's bimap would work for me (I need a cons...
Herald asked 13/4, 2011 at 9:52

1

Solved

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 t...
Shutout asked 8/8, 2010 at 22:30

1

Solved

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 { //... ...
Chloropicrin asked 7/10, 2009 at 18:58
1

© 2022 - 2024 — McMap. All rights reserved.