Vector<T>.Window Method

Definition

Namespace: Numerics.NET
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 9.0.2

Overload List

Window<U>(Int32, AggregatorGroup<U>) Returns a new vector that aggregates the values in a sliding window of the specified size.
Window<U>(Int32, Int32, Boolean, AggregatorGroup<U>) Returns a new vector that aggregates the values in a sliding window of the specified size.

Window<U>(Int32, AggregatorGroup<U>)

Returns a new vector that aggregates the values in a sliding window of the specified size.
C#
public Vector<U> Window<U>(
	int size,
	AggregatorGroup<U> aggregator
)

Parameters

size  Int32
The size of the window.
aggregator  AggregatorGroup<U>
The aggregator to apply to each group.

Type Parameters

U
The type of the result of the aggregator.

Return Value

Vector<U>
A new vector, indexed by the index of the first element in the window, and as values the result of applying aggregator to each window.

Window<U>(Int32, Int32, Boolean, AggregatorGroup<U>)

Returns a new vector that aggregates the values in a sliding window of the specified size.
C#
public Vector<U> Window<U>(
	int size,
	int offset,
	bool includePartialWindows,
	AggregatorGroup<U> aggregator
)

Parameters

size  Int32
The size of the window.
offset  Int32
The offset from the start of the window of the key that is used to represent the group in the grouping's index.
includePartialWindows  Boolean
Indicates whether windows at the boundaries that are smaller than size should be evaluated.
aggregator  AggregatorGroup<U>
The aggregator to apply to each group.

Type Parameters

U
The type of the result of the aggregator.

Return Value

Vector<U>
A new vector, indexed by the index of the first element in the window, and as values the result of applying aggregator to each window.

See Also