Exemple #1
0
 /// <inheritdoc cref="Impl.InternalSet{T}.SetEquals(ISet{T}, int)"/>
 public bool SetEquals(MSet <T> other)
 {
     return(Count == other.Count && IsSubsetOf(other));
 }
Exemple #2
0
 public MSet <T> Union(MSet <T> other)
 {
     return(Union(other._set, false));
 }
Exemple #3
0
 public bool Overlaps(MSet <T> other)
 {
     return(_set.Overlaps(other.InternalSet, _comparer));
 }
Exemple #4
0
 /// <inheritdoc cref="Impl.InternalSet{T}.IsProperSupersetOf(ISet{T}, IEqualityComparer{T}, int)"/>
 public bool IsProperSupersetOf(MSet <T> other)
 {
     return(Count > other.Count && IsSupersetOf(other));
 }
Exemple #5
0
 public bool IsSubsetOf(MSet <T> other)
 {
     return(Count <= other.Count && _set.IsSubsetOf(other.InternalSet, other.Comparer));
 }
Exemple #6
0
 public bool IsSupersetOf(MSet <T> other)
 {
     return(Count >= other.Count && _set.IsSupersetOf(other.InternalSet, _comparer));
 }
Exemple #7
0
 public int SymmetricExceptWith(MSet <T> other)
 {
     int d = _set.SymmetricExceptWith(other.InternalSet, _comparer); _count += d; return(d);
 }
Exemple #8
0
 /// <summary>Removes all items from this set that are not present in 'other'.</summary>
 public int IntersectWith(MSet <T> other)
 {
     int r = _set.IntersectWith(other.InternalSet, other.Comparer); _count -= r; return(r);
 }
Exemple #9
0
 public int ExceptWith(MSet <T> other)
 {
     int r = _set.ExceptWith(other.InternalSet, _comparer); _count -= r; return(r);
 }
Exemple #10
0
 public int UnionWith(MSet <T> other, bool replaceIfPresent = false)
 {
     int a = _set.UnionWith(other.InternalSet, _comparer, replaceIfPresent); _count += a; return(a);
 }
Exemple #11
0
 bool IEquatable <MSet <T> > .Equals(MSet <T> rhs)
 {
     return(SetEquals(rhs));
 }