Skip to main content

Questions tagged [multimap]

A container similar to a map but allowing duplicate keys

multimap
1 vote
0 answers
27 views

How to query frequently a MultiMap in Hazelcast?

I am using Hazelcast 5, for most of our use cases IMaps were satisfactory. However I have an IMap where the value is a Collection currently, so I am looking to switch that to MultiMap. This map is ...
DemonFace's user avatar
0 votes
2 answers
69 views

Filter entries in Multimap to remove duplicates

I have a Google Guava MultiMap, namely com.google.common.collect.ArrayListMultimap, in Java that has a lot of entries. The entries are string, like this: URL1=URL2 URL2=URL1 URL4=URL3 URL3=URL4 As ...
Costas Ginos's user avatar
1 vote
0 answers
67 views

Java Map with Multimap values - how to efficient split the true entries from the false ones

I have a Map made up of this structure Map<String, Multimap<Boolean, String>> . I want to separate all the true entries in one new map and the false ones in a second. I have the following (...
Timothy Clotworthy's user avatar
0 votes
1 answer
62 views

Need for lock on key when trying to update Multimap value

We have a use case where we are using the Hazelcast Multimap. We’re spawning one thread each for every element within the Collection for every key. For instance, if key1 has, say, 10 values, then we ...
Jitendra Savanur's user avatar
0 votes
0 answers
57 views

Error in custom comparator for multimap stl c++11

I am trying to run the following code where I create the multimap structure with key and value as pair of two integer values. I want the stucture to be sorted (without using explicit sorting ...
Piyush Rajendra Chaudhari's user avatar
0 votes
0 answers
54 views

Best structure of Multiple indexed map

Problem Multiple indexed map : A value has several key, that can be used to find the value in a short time (may be less than O(n)). The key is NON-UNIQUE, which means key1: val1, key1: val2, key1: ...
coding monster's user avatar
0 votes
1 answer
141 views

Search by value in a multimap in O(log(n)) complexity

How can I efficiently search for a value in a multimap with a time complexity of O(log(n))? I have a multimap where the keys represent locations and the values represent city names. I want to ...
DanielG's user avatar
  • 277
0 votes
2 answers
57 views

How do I remove a specific item from my multimap?

#include <map> #include <iostream> int main() { std::multimap <int, int> map; // insert the values in multimap map.insert(std::make_pair(1, 10)); map.insert(std::...
ElemehnoP's user avatar
0 votes
0 answers
98 views

how to let jackson deserialize guava multimap using the '@class' field inside json to deside the target class?

I have a json like this: { '@class':'A', 'aProperty':{ '@class': 'com.google.common.collect.ArrayListMultimap', 'a':[1,2,3], 'b':[22] } } and the class A like this: class A{ ...
user2115763's user avatar
0 votes
2 answers
95 views

How to calculate average from Collection of HashMap<String, Double>

I have a Collection of HashMap<String, Duble> which I am getting from multimap. I want to calculate the average on Maps values and calculate which Map key is having minimum average. The data ...
user565's user avatar
  • 989
-2 votes
1 answer
340 views

Iterate over all the elements in a std::multimap with the same key

I want to add objects so a multi-map and some should have the same key how can I get access to all the elements which the same key? Can I do a ranged fore lope over only the specific keys or something ...
Isak True's user avatar
1 vote
1 answer
377 views

Finding a key-value-pair within a std::multimap with key of type int

I have a std::multimap<int, X*> where X is a user-defined type. I want to find a specific key-value-pair within this multimap (i.e. an iterator pointing to this pair). (A) Complete Example: #...
Trazom's user avatar
  • 13
-1 votes
1 answer
66 views

Why can't IDE find the map I declared already in Guava Multimap using Enum? [duplicate]

English is not my first language. Sorry in advance if there's something unclear. I'm working on a college assignment using Enum and Google Guava Multimap. In my previous assignment(which is almost the ...
Lion98's user avatar
  • 13
0 votes
1 answer
41 views

How to print the matching value of key from (Google Guava) Multimap?

I would like to print the matching value of key from multimap. So far I have been unsuccessful at it. These are the line of code I got so far about it : dictionaryGG.keys().forEach((key) -> { ...
user avatar
0 votes
0 answers
89 views

Multimap of pointers as a class member on the heap

[Edit: I got some friends to look at this, and I'm fairly certain that how I handle some pointers within my member functions are the cause of this. The problem is that all the new/heap/etc. ...
DSiegmeyer's user avatar

15 30 50 per page
1
2 3 4 5
52