1using System.Collections.Generic;
2using System.Threading.Tasks;
36 LinkedList<IElement> Rows =
new LinkedList<IElement>();
54 LinkedList<IElement> Rows =
new LinkedList<IElement>();
69 LinkedList<IElement>
Elements =
new LinkedList<IElement>();
88 if (Columns.Value != i)
102 if (!Columns.HasValue || Columns.Value < 0)
126 ISet CommonSuperSet =
null;
128 LinkedList<IElement> Upgraded =
null;
131 if (
Elements.Count == Rows && Columns > 1)
133 List<IElement> Temp =
new List<IElement>();
138 Temp.AddRange(V.VectorElements);
148 if (CommonSuperSet is
null)
171 CommonSuperSet =
null;
176 if (Upgraded is
null)
178 Upgraded =
new LinkedList<IElement>();
188 CommonSuperSet =
null;
192 Upgraded.AddLast(Element3);
193 if (++i >= ItemIndex)
198 Upgraded.AddLast(Element2);
206 if (!(CommonSuperSet is
null))
208 if (!(Upgraded is
null))
211 if (!(CommonSuperSet is
null))
236 if (!(CheckAgainst is
IMatrix Matrix) || Matrix.Rows != c)
242 if (Matrix is
IVector RowVectors)
246 foreach (
IElement E
in RowVectors.VectorElements)
255 for (i = 0; i < c; i++)
Base class for all types of elements.
abstract ISet AssociatedSet
Associated Set.
Base class for all types of sets.
abstract override bool Equals(object obj)
Compares the element to another.
Script runtime exception.
Class managing a script expression.
static bool UpgradeField(ref IElement E1, ref ISet Set1, ref IElement E2, ref ISet Set2)
Upgrades elements if necessary, to a common field extension, trying to make them compatible.
Base class for all nodes in a parsed script tree.
int Length
Length of expression covered by node.
virtual PatternMatchResult PatternMatch(IElement CheckAgainst, Dictionary< string, IElement > AlreadyFound)
Performs a pattern match operation.
int Start
Start position in script expression.
abstract IElement Evaluate(Variables Variables)
Evaluates the node, using the variables provided in the Variables collection. This method should be ...
virtual Task< IElement > EvaluateAsync(Variables Variables)
Evaluates the node, using the variables provided in the Variables collection. This method should be ...
The field Z_2 of boolean numbers ([0]_2, 0 or false, and [1]_2, 1 or true).
Pseudo-field of Complex numbers, as an approximation of the field of real numbers.
Pseudo-field of double numbers, as an approximation of the field of real numbers.
Represents a list of elements.
bool isAsync
If any of the elements are asynchronous
ScriptNode[] Elements
Elements.
override PatternMatchResult PatternMatch(IElement CheckAgainst, Dictionary< string, IElement > AlreadyFound)
Performs a pattern match operation.
override async Task< IElement > EvaluateAsync(Variables Variables)
Evaluates the node, using the variables provided in the Variables collection.
override IElement Evaluate(Variables Variables)
Evaluates the node, using the variables provided in the Variables collection.
MatrixDefinition(ScriptNode[] Rows, int Start, int Length, Expression Expression)
Creates a matrix.
static IMatrix Encapsulate(ICollection< IElement > Elements, int Rows, int Columns, ScriptNode Node)
Encapsulates the elements of a matrix.
static IMatrix Encapsulate(ICollection< IElement > Rows, ScriptNode Node)
Encapsulates the elements of a matrix.
Basic interface for all types of elements.
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 matrices.
Basic interface for vectors.
int Dimension
Dimension of vector.
Basic interface for all types of module elements.
Basic interface for all types of sets.
PatternMatchResult
Status result of a pattern matching operation.