Exemple #1
0
 /// <summary>
 /// This method finds elements in U (universal set - superset that has all elements in A and more) but not in A
 /// </summary>
 /// <returns>a SetClass object that contains elements in U but not in A</returns>
 /// <param name="U">The universal set</param>
 public SetClass <T> Complement(SetClass <T> U)
 {
     return(U.Difference(this));
 }
Exemple #2
0
 /// <summary>
 /// This method find elements in current set (set A), but not in input set B AND
 /// elements in input set B, but not in current set.
 /// </summary>
 /// <returns>a SetClass object that contains elements in A but not in B, and elements in B but not in A</returns>
 /// <param name="B">B.</param>
 public SetClass <T> SymmetricDifference(SetClass <T> B)
 {
     //Any implementation that gets (A - B) union (B - A)
     return(this.Difference(B).UnionWith(B.Difference(this)));
 }