public static bool isSubsetOf(ArraySet a, ArraySet b) { foreach (object i in a.data) { if (!b.contains((double)i)) { return(false); } } return(true); }
public ArraySet difference(ArraySet e) { ArraySet temp = (ArraySet)this.Clone(); foreach (double i in this.data) { if (e.contains(i)) { temp.remove(i); } } return(temp); }
public ArraySet Union(ArraySet e) { ArraySet temp = (ArraySet)this.Clone(); foreach (double j in e.data) { if (!temp.contains(j)) { temp.add(j); } } return(temp); }