2using System.Collections.Generic;
13 private readonly
ISet set1;
14 private readonly
ISet set2;
34 return this.set1.Contains(
Element) && !this.set2.Contains(
Element);
42 public override bool Equals(
object obj)
47 return (this.set1.Equals(S.set1) &&
this.set2.Equals(S.set2));
58 return this.set1.GetHashCode() ^ this.set2.GetHashCode();
68 if (!(this.elements is
null))
69 return this.elements.Keys;
71 ICollection<IElement> E1 = this.set1.ChildElements;
75 Dictionary<IElement, bool> Elements =
new Dictionary<IElement, bool>();
79 if (!this.set2.Contains(E))
83 this.elements = Elements;
88 private Dictionary<IElement, bool> elements =
null;
93 return this.set1.ToString() +
"\\" + this.set2.ToString();
104 if (Elements is
null)
107 object[] Elements2 =
new object[Elements.Count];
125 if (ChildElements is
null)
Base class for all types of elements.
Base class for all types of sets.
Represents a set difference A\B.
override bool Equals(object obj)
Compares the element to another.
override ICollection< IElement > ChildElements
An enumeration of child elements. If the element is a scalar, this property will return null.
override bool Contains(IElement Element)
Checks if the set contains an element.
SetDifference(ISet Set1, ISet Set2)
Represents a Intersection of two sets.
override string ToString()
override int GetHashCode()
Calculates a hash code of the element.
override object AssociatedObjectValue
Associated object value.
override? int Size
Size of set, if finite and known, otherwise null is returned.
Basic interface for all types of elements.
object AssociatedObjectValue
Associated object value.
Basic interface for all types of sets.