1

Everything was going fine till I had one dimensional data, where I used Bidirectional Multimap like

typedef boost::bimap<bimaps::multiset_of<int>, bimaps::set_of<int>> bimap_one_d;
typedef bimap_one_d::value_type value_type;
bimap_one_d bimap; 

My need is to store the date in multidimensional nature. Suppose I have many frames 1, 2, 3, containing keys and values.

1 -> (100, 10), (70,50), (80, 30)
2 -> (50,60), (90,20), (100,40)
3 -> (210,200),(2345,16374), (98345,334)

How can I maintain bidirectional multimap like structure for the data where I have many rows (1, 2, 3) so that all frames are accessible like bidirectional multimap. For example, I should be able to go through any frame and access the key and value in bi-direction

Note: I am not interested to maintain three separate bidirectional multimap, one for each frame, indeed I am looking for a solution in a multidimensional nature, like we have vector of vectors or multi dimensional array.

Agaz Wani
  • 5,514
  • 8
  • 42
  • 62
  • It is not clear what you actually need but `std::array` or `boost::bimap>, bimaps::set_of>>` should come close, with the former being more multi-frame and the latter more multdimensional. – stefaanv May 30 '16 at 08:01
  • You can try out boost::multi index, you can do lot of things with it. – Nik May 30 '16 at 08:30
  • @stefaanv Thanks for your comment. In `Bidirectional multimap`, I can push only one frame say `1 -> (100, 10), (70,50), (80, 30)`, but I would like to push many frames. Just imagine it as multidimensional, where rows are different frames. – Agaz Wani May 30 '16 at 09:16
  • @Nik Thanks, will give a try. – Agaz Wani May 30 '16 at 09:20

0 Answers0