public object Clone() { ArraySet temp = new ArraySet(); foreach (double i in this.data) { temp.add(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); }
public ArraySet intersection(ArraySet e) { ArraySet temp = new ArraySet(); foreach (double i in this.data) { foreach (double j in e.data) { if (i == j) { temp.add(i); break; } } } return(temp); }