Click or drag to resize

Ultimate Summator

UltimateSummator is a special class for fast sum calculation on sliding window.

The following constructors create an instance of this class:

Constructor

Description

methodUltimateSummator

Default constructor.

methodUltimateSummator(Int32)

Create new instance of ultimate summator with point-based sliding window sized.

methodUltimateSummator(TimeSpan)

Create new instance of ultimate summator with time-based sliding window sized.

It contains properties:

Property

Description

PropertyCount

Number of elements in collection.

PropertyTotalSum

Total sum of points in sliding window.

PropertyItemInt32

Get data which was store "pointsCount" steps ago.

PropertyItemDateTime

Return historically latest element with smaller or equal DateTime.

Note Note

Do not try to use this method if you didn't specify DateTime to data elements.

The class contains field DefaultDateTime which is the default DateTime, which will be assumed as default date value.

Methods:

Method

Description

methodGetEnumerator

Returns an enumerator that iterates through a collection.

methodPut(Double, DateTime)

methodPut(Double)

Store new data element in summator. Returns true if and only if we succeed to add element.

Note Note

Please do not use both with and without DateTime method for one queue instance.

methodGetIntervalSum(DateTime, DateTime)

methodGetIntervalSum(Int32, Int32)

Get sum on time-baseed or point-based interval. User sets inclusive left and right boundaries of interval.

methodGetIntervalSumOffsets(Int32, Int32)

Get sum on point-based interval. User sets boundaries as offsets.

methodGetSumFromFirst(DateTime)

Get sum from the oldest point in sliding window to specified time inclusively.

methodGetSumFromFirst(Int32)

Get sum of pointsCount elements starting from the very oldest point.

methodGetSumFromLast(DateTime)

Get sum from the oldest point in sliding window to specified time inclusively.

methodGetSumFromLast(Int32)

Get sum from the recent point in sliding window to specified time inclusively.

methodToArray

Copies the elements of the SimpleDataQueue to a new array.

methodClone

Makes full copy of this instance.

methodCopyTo(Object)

Sets internal state to destination object.