2using System.Collections.Generic;
13 private readonly
ISet set1;
14 private readonly
ISet set2;
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 ICollection<IElement> E2 = this.set2.ChildElements;
79 Dictionary<IElement, bool> Elements =
new Dictionary<IElement, bool>();
84 Dictionary<IElement, bool> Elements2 =
new Dictionary<IElement, bool>();
88 if (Elements.ContainsKey(E))
92 this.elements = Elements2;
93 return Elements2.Keys;
97 private Dictionary<IElement, bool> elements =
null;
102 return this.set1.ToString() +
"∩" + this.set2.ToString();
113 if (Elements is
null)
116 object[] Elements2 =
new object[Elements.Count];
134 if (ChildElements is
null)
Base class for all types of elements.
Base class for all types of sets.
Represents a Intersection of two sets.
override int GetHashCode()
Calculates a hash code of the element.
IntersectionSet(ISet Set1, ISet Set2)
Represents a Intersection of two sets.
override? int Size
Size of set, if finite and known, otherwise null is returned.
override bool Equals(object obj)
Compares the element to another.
override string ToString()
override bool Contains(IElement Element)
Checks if the set contains an element.
override ICollection< IElement > ChildElements
An enumeration of child elements. If the element is a scalar, this property will return null.
override object AssociatedObjectValue
Associated object value.
Basic interface for all types of elements.
object AssociatedObjectValue
Associated object value.
Basic interface for all types of sets.