public PowerSet xor(PowerSet set) { PowerSet temp1 = new PowerSet(); PowerSet temp2 = new PowerSet(); temp1 = union(set); temp2 = intersection(set); foreach (object a in temp2.dict.Values) { temp1.remove(a); } return(temp1); }
public PowerSet difference(PowerSet set) { PowerSet temp = new PowerSet(); foreach (object a in dict.Values) { temp.put(a); } foreach (object a in set.dict.Values) { if (dict.ContainsKey(Convert.ToString(a))) { temp.remove(a); } } return(temp); }