I have a multi set Bimap that looks like:
6 <--> 71
6 <--> 71
6 <--> 71
8 <--> 71
8 <--> 71
10 <--> 71
10 <--> 74
element = left key + right key, or a row in the above block
I would like to remove the elements where the lines are equivalent to another line, for example, I would like to remove two lots of the 6 <--> 71. Essentially, every bimap element must be unique. The left and right keys must be multi sets for my use-case. I would also like to do this post creating the bimap. Is there an inbuilt function that requires every element to be unique? If this isn't the case, does anyone know a good way to do this?
The minimal code I am using is as follows:
typedef boost::bimap<boost::bimaps::multiset_of<int>,
boost::bimaps::multiset_of<int>> bimap;
bimap bm;
//fill with elements from two vectors
//vectors have the same size by definition
for(int j = 0; j < matching1.size(); j++){
bm.insert({matching1[j],matching2[j]});
}