Neuron®
The Neuron® is the basis for the creation of open and secure federated networks for smart societies.
Loading...
Searching...
No Matches
ToVectorEvaluator.cs
4
6{
11 {
12 private readonly ChunkedList<IElement> elements = new ChunkedList<IElement>();
13
19 : base(Node.Operand)
20 {
21 }
22
26 public override void RestartEvaluator()
27 {
28 this.elements.Clear();
29 }
30
35 public override void AggregateElement(IElement Element)
36 {
37 this.elements.Add(Element);
38 }
39
43 public override IElement GetAggregatedResult()
44 {
45 return VectorDefinition.Encapsulate(this.elements.ToArray(), false, this.Node);
46 }
47 }
48}
A chunked list is a linked list of chunks of objects of type T .
Definition: ChunkedList.cs:54
Base class for all types of elements.
Definition: Element.cs:14
An interative evaluator of a function or operation defined by a single ScriptNode.
ScriptNode Node
Node being iteratively evaluated.
ToVectorEvaluator(ToVector Node)
ToVector(v) iterative evaluator
override IElement GetAggregatedResult()
Gets the aggregated result.
override void AggregateElement(IElement Element)
Aggregates one new element.
override void RestartEvaluator()
Restarts the evaluator.
static IElement Encapsulate(Array Elements, bool CanEncapsulateAsMatrix, ScriptNode Node)
Encapsulates the elements of a vector.
Basic interface for all types of elements.
Definition: IElement.cs:21