I want to maintain a set within which every element is assigned a label among {a,b,c} besides their indexes. I can iterate all elements in the set and iterate through the subset of element which have the same label. Is there any structure in boost library can facilitate the process? Thanks for any hint.:-)
for example:
a set {{idx:1 label:A},{idx:2 label:A},{idx:3 label:C},{idx:4 label:B},{idx:5 label:C}}
I can iterate all elements within the set and get
{idx:1 label:A},{idx:2 label:A},{idx:3 label:C},{idx:4 label:B},{idx:5 label:C}
and can iterate subset of every label
iterator subset of A
idx:1 label:A},{idx:2 label:A}