I am using Contains method on SortedSet<SortedSet<int>> to check for existence of SortedSet<int>(call it, Itemset). Sample code is as follows:
Itemset j = new Itemset() { 1, 2 };
Itemset i = new Itemset() { 1, 3 };
SortedSet<Itemset> ItemsetCollection = new SortedSet<Itemset>();
ItemsetCollection.Add(i);
ItemsetCollection.Add(j);
If I have an itemset exactly similar to say, i and check for its membership in ItemsetCollection using Contains as shown below the check returns a false as it expects the name to be same as i
Itemset iset = new Itemset(){1,2};
bool b = ItemsetCollection.Contains(iset);
How else can the membership be checked if I am generating itemsets randomly and need to check for its presence in ItemSetCollection?