コード例 #1
0
ファイル: Set.cs プロジェクト: ByteSempai/Ubiquitous
 /// <summary>
 /// Returns union of two sets.
 /// </summary>
 public static Set Union(Set a, Set b)
 {
     a.CheckComparer(b);
     Set result = new Set(a.Comparer);
     SetOp.Union(a, b, a.Comparer, new Inserter(result));
     return result;
 }
コード例 #2
0
ファイル: Set.cs プロジェクト: ByteSempai/Ubiquitous
 /// <summary>
 /// Returns intersection of two sets.
 /// </summary>
 /// <remarks>Intersection contains elements present in both sets.</remarks>
 public Set Intersection(Set other)
 {
     return Intersection(this, other);
 }
コード例 #3
0
ファイル: Set.cs プロジェクト: ByteSempai/Ubiquitous
 /// <summary>
 /// Returns union of two sets.
 /// </summary>
 public Set Union(Set other)
 {
     return Union(this, other);
 }
コード例 #4
0
ファイル: Set.cs プロジェクト: ByteSempai/Ubiquitous
 /// <summary>
 /// Returns symmetric difference of two sets.
 /// </summary>
 /// <remarks>
 /// Symmetric difference contains elements present in one of the sets, but not in both
 /// </remarks>
 public static Set SymmetricDifference(Set a, Set b)
 {
     a.CheckComparer(b);
     Set result = new Set(a.Comparer);
     SetOp.SymmetricDifference(a, b, a.Comparer, new Inserter(result));
     return result;
 }
コード例 #5
0
ファイル: Set.cs プロジェクト: ByteSempai/Ubiquitous
 /// <summary>
 /// Returns symmetric difference of two sets.
 /// </summary>
 /// <remarks>
 /// Symmetric difference contains elements present in one of the sets, but not in both.
 /// </remarks>
 public Set SymmetricDifference(Set other)
 {
     return SymmetricDifference(this, other);
 }
コード例 #6
0
ファイル: Set.cs プロジェクト: ByteSempai/Ubiquitous
 /// <summary>
 /// Returns difference of two sets.
 /// </summary>
 /// <remarks>
 /// Difference contains elements present in first set, but not in the second.<br/>
 /// Difference is not symmetric. Difference(a,b) is not equal to Difference(b,a)
 /// </remarks>
 public Set Difference(Set other)
 {
     return Difference(this, other);
 }