I'm using interval_map from BOOST library.
typedef set<int> Tpopulations;
interval_map<int, Tpopulations> populations;
Say I have this in populations
[1006311,1006353) 1611,1653,
[1006353,1006432) 1031,1611,1653,
[1006432,1006469] 1031,1387,1523,1611,1653,
(1006469,1006484] 1031,1387,1611,1653,
(1006484,1006496] 1031,1387,1611,
(1006496,1006506] 1031,1611,
(1006506,1006547] 1031,
Now I want to find out what is mapped on some number: I would expect something like:
cout << populations[1006313]; // 1611,1653
or
cout << populations.at(1006313); // 1611,1653
However I seem not to find any such a method.
Do I really need to define anoher interval map as "window" and do intersection? Something like:
interval_map<int, Tpopulations> window;
set<int>empty_set;
window +=(make_pair(1006313,empty_set));
cout << populations & window