Returns a grouping that represents a moving window based on the specified condition.
Namespace:
Extreme.DataAnalysis
Assembly:
Extreme.Numerics (in Extreme.Numerics.dll) Version: 8.1.1
public static Grouping<T> VariableWindow<T>(
IList<T> index,
Func<T, T, bool> condition,
bool incremental,
Direction direction
)
Public Shared Function VariableWindow(Of T) (
index As IList(Of T),
condition As Func(Of T, T, Boolean),
incremental As Boolean,
direction As Direction
) As Grouping(Of T)
public:
generic<typename T>
static Grouping<T>^ VariableWindow(
IList<T>^ index,
Func<T, T, bool>^ condition,
bool incremental,
Direction direction
)
static member VariableWindow :
index : IList<'T> *
condition : Func<'T, 'T, bool> *
incremental : bool *
direction : Direction -> Grouping<'T>
Parameters
- index
- Type: System.Collections.GenericIListT
The index the grouping is over. - condition
- Type: SystemFuncT, T, Boolean
A delegate that indicates whether two keys are
in the same window. - incremental
- Type: SystemBoolean
Indicates that the right edge of the window
is not decreasing. - direction
- Type: Extreme.DataAnalysisDirection
Specifies whether the condition should be verified
moving forward or backward through the values.
Type Parameters
- T
- The element type of the index.
Return Value
Type:
GroupingT
The extent of each window is determined by the first key value and
condition. The window is extended as long as
condition returns whe applied
to the first key and the subsequent keys.
Reference