Grouping.Variable Window<TInput> Method
Returns a grouping that represents a moving window based on the specified condition.
Definition
Namespace: Numerics.NET.DataAnalysis
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 9.0.3
C#
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 9.0.3
public static Grouping<TInput> VariableWindow<TInput>(
IList<TInput> index,
Func<TInput, TInput, bool> condition,
bool incremental,
Direction direction
)
Parameters
- index IList<TInput>
- The index the grouping is over.
- condition Func<TInput, TInput, Boolean>
- A delegate that indicates whether two keys are in the same window.
- incremental Boolean
- Indicates that the right edge of the window is not decreasing.
- direction Direction
- Specifies whether the condition should be verified moving forward or backward through the values.
Type Parameters
- TInput
- The element type of the index.
Return Value
Grouping<TInput>Remarks
The extent of each window is determined by the first key value and condition. The window is extended as long as condition returns true whe applied to the first key and the subsequent keys.
Exceptions
Argument | index is null. -or- condition is null. |