0

I have a python dictionary whose keys are 1D arrays (or vectors) and the value of a key is a set or 1D arrays (or a 2D matrix).

I wonder if there is a way to implement or a library in C++ that can build a python-like dictionary data structure. And when I am looping over a set of vectors, I could update my dictionary like

dict = {}
for vk in VK:
{
    if vk not in dict.keys():
       dict.update({vk:matrixk})
}
KevinKim
  • 1,382
  • 3
  • 18
  • 34
  • 4
    Looking for [`std::unordered_map`](http://en.cppreference.com/w/cpp/container/unordered_map) ? ...Umm... How about some [good C++ resources](http://stackoverflow.com/questions/388242/the-definitive-c-book-guide-and-list)? – WhiZTiM Mar 12 '17 at 20:01
  • 1
    You're probably looking for boost: http://www.boost.org/doc/libs/1_63_0/libs/python/doc/html/index.html – thebjorn Mar 12 '17 at 20:06

0 Answers0