Neuron®
The Neuron® is the basis for the creation of open and secure federated networks for smart societies.
Loading...
Searching...
No Matches
CountEvaluator.cs
4
6{
11 {
12 private long count = 0;
13
19 : base(Node.Arguments[0])
20 {
21 }
22
26 public override void RestartEvaluator()
27 {
28 this.count = 0;
29 }
30
34 public override bool UsesElement => false;
35
40 public override void AggregateElement(IElement Element)
41 {
42 this.count++;
43 }
44
48 public override IElement GetAggregatedResult()
49 {
50 return new DoubleNumber(this.count);
51 }
52 }
53}
Base class for all types of elements.
Definition: Element.cs:14
override bool UsesElement
If the evaluator uses the current element in its aggregate evaluation.
CountEvaluator(Count Node)
Count(v) iterative evaluator
override void RestartEvaluator()
Restarts the evaluator.
override void AggregateElement(IElement Element)
Aggregates one new element.
override IElement GetAggregatedResult()
Gets the aggregated result.
An interative evaluator of a function or operation defined by a single ScriptNode.
ScriptNode Node
Node being iteratively evaluated.
Basic interface for all types of elements.
Definition: IElement.cs:21