Groups elements in fixed size blocks by passing a "sliding window" over them.
Namespace: SequencesAssembly: Sequences (in Sequences.dll) Version: 1.0.1.0 (1.0.1)
Syntax IEnumerable<ISequence<T>> Sliding(
int size,
int step
)
IEnumerable<ISequence<T>> Sliding(
int size,
int step
)
Function Sliding (
size As Integer,
step As Integer
) As IEnumerable(Of ISequence(Of T))
Function Sliding (
size As Integer,
step As Integer
) As IEnumerable(Of ISequence(Of T))
IEnumerable<ISequence<T>^>^ Sliding(
int size,
int step
)
IEnumerable<ISequence<T>^>^ Sliding(
int size,
int step
)
abstract Sliding :
size : int *
step : int -> IEnumerable<ISequence<'T>>
abstract Sliding :
size : int *
step : int -> IEnumerable<ISequence<'T>>
Parameters
- size
- Type: System Int32
The number of elements per group.
- step
- Type: System Int32
The number of elements to skip per iteration.
Return Value
Type:
IEnumerable ISequence T An iterator producing sequences of size
size. The last sequence will be truncated if there are fewer elements than
size.
See Also