17 private double doubleSum = 0;
18 private long count = 0;
19 private bool isDouble =
true;
40 if (this.doubleValues is
null)
43 this.doubleValues.
Clear();
45 this.elementValues =
null;
56 this.doubleSum += D.Value;
57 this.doubleValues.
Add(D.Value);
59 else if (this.sum is
null)
61 this.isDouble =
false;
64 if (this.doubleValues.
Count > 0)
69 while (!(Loop is
null))
71 for (i = Loop.
Start, c = Loop.
Pos; i < c; i++)
101 else if (this.isDouble)
103 double Average = this.doubleSum / this.count;
110 while (!(Loop is
null))
112 for (i = Loop.
Start, c = Loop.
Pos; i < c; i++)
115 Result += Term * Term;
132 while (!(Loop is
null))
134 for (i = Loop.
Start, c = Loop.
Pos; i < c; i++)
Node referencing a chunk in a ChunkedList<T>
ChunkNode< T > Next
Next chunk
int Pos
Index after the last element in chunk.
T[] Elements
Array of elements in chunk.
int Start
Index of first element in chunk.
A chunked list is a linked list of chunks of objects of type T .
void Clear()
Clears the collection.
ChunkNode< T > FirstChunk
First chunk
int Count
Number of elements in collection.
void Add(T Item)
Adds an item to the collection.
Base class for all types of elements.
Variance(v) iterative evaluator
override void RestartEvaluator()
Restarts the evaluator.
override IElement GetAggregatedResult()
Gets the aggregated result.
VarianceEvaluator(Variance Node)
Variance(v) iterative evaluator
override void AggregateElement(IElement Element)
Aggregates one new element.
An interative evaluator of a function or operation defined by a single ScriptNode.
ScriptNode Node
Node being iteratively evaluated.
static readonly ObjectValue Null
Null value.
static IElement EvaluateAddition(IElement Left, IElement Right, ScriptNode Node)
Adds two operands.
static IElement EvaluateDivision(IElement Left, IElement Right, ScriptNode Node)
Divides the right operand from the left one.
static IElement EvaluateMultiplication(IElement Left, IElement Right, ScriptNode Node)
Multiplies two operands.
static IElement EvaluateSubtraction(IElement Left, IElement Right, ScriptNode Node)
Subtracts the right operand from the left one.
Basic interface for all types of elements.