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 public IEnumerable<ISequence<T>> Sliding(
int size,
int step
)
public IEnumerable<ISequence<T>> Sliding(
int size,
int step
)
Public Function Sliding (
size As Integer,
step As Integer
) As IEnumerable(Of ISequence(Of T))
Public Function Sliding (
size As Integer,
step As Integer
) As IEnumerable(Of ISequence(Of T))
public:
virtual IEnumerable<ISequence<T>^>^ Sliding(
int size,
int step
) sealed
public:
virtual IEnumerable<ISequence<T>^>^ Sliding(
int size,
int step
) sealed
abstract Sliding :
size : int *
step : int -> IEnumerable<ISequence<'T>>
override Sliding :
size : int *
step : int -> IEnumerable<ISequence<'T>>
abstract Sliding :
size : int *
step : int -> IEnumerable<ISequence<'T>>
override 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.
Implements
ISequence T Sliding(Int32, Int32)See Also