Vector<T>.Window<U>(Int 32, Int 32, Boolean, Aggregator Group<U>) Method
Returns a new vector that aggregates the values in a sliding window
of the specified size.
Definition
Namespace: Extreme.Mathematics
Assembly: Extreme.Numerics (in Extreme.Numerics.dll) Version: 8.1.23
C#
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.
Assembly: Extreme.Numerics (in Extreme.Numerics.dll) Version: 8.1.23
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.