2using System.Collections.Generic;
37 return Operators.Sets.SetDefinition.
Encapsulate(Elements);
45 public override abstract bool Equals(
object obj);
76 throw new ScriptException(
"Enumeration of set elements requires its finite members to be defined.");
103 if (!(E is
ISet Result))
106 Result =
new FiniteSet(Vector.VectorElements);
110 Result = Obj as
ISet;
113 if (Obj is IEnumerable<IElement> Elements)
115 else if (Obj is IEnumerable<object> Objects)
117 LinkedList<IElement> List =
new LinkedList<IElement>();
119 foreach (
object x
in Objects)
Base class for all types of elements.
Base class for all types of sets.
static ISet ToSet(IElement E)
Converts (if necessary) the element E into a set.
override object AssociatedObjectValue
Associated object value.
abstract override bool Equals(object obj)
Compares the element to another.
abstract override int GetHashCode()
Calculates a hash code of the element.
Set()
Base class for all types of sets.
abstract bool Contains(IElement Element)
Checks if the set contains an element.
override ISet AssociatedSet
Associated Set.
override IElement Encapsulate(ICollection< IElement > Elements, ScriptNode Node)
Encapsulates a set of elements into a similar structure as that provided by the current element.
override bool IsScalar
If the element represents a scalar value.
virtual ? int Size
Size of set, if finite and known, otherwise null is returned.
override ICollection< IElement > ChildElements
An enumeration of child elements. If the element is a scalar, this property will return null.
Base class for script exceptions.
Class managing a script expression.
static IElement Encapsulate(object Value)
Encapsulates an object.
Base class for all nodes in a parsed script tree.
static readonly SetOfSets Instance
Instance of the set of all sets.
Basic interface for all types of elements.
object AssociatedObjectValue
Associated object value.
IElement Encapsulate(ICollection< IElement > Elements, ScriptNode Node)
Encapsulates a set of elements into a similar structure as that provided by the current element.
Basic interface for vectors.
Basic interface for all types of sets.