Returns a grouping that represents a moving window based on the specified condition.
Namespace: Extreme.CollectionsAssembly: Extreme.Numerics.Net40 (in Extreme.Numerics.Net40.dll) Version: 6.0.16073.0 (6.0.16312.0)
public static Grouping<T> VariableWindow<T>(
Index<T> index,
Func<T, T, bool> condition,
bool incremental,
Direction direction
)
Public Shared Function VariableWindow(Of T) (
index As Index(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(
Index<T>^ index,
Func<T, T, bool>^ condition,
bool incremental,
Direction direction
)
static member VariableWindow :
index : Index<'T> *
condition : Func<'T, 'T, bool> *
incremental : bool *
direction : Direction -> Grouping<'T>
Parameters
- index
- Type: Extreme.CollectionsIndexT
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.CollectionsDirection
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.
Numerical Libraries
Supported in: 5.x
Reference