splitFrames

Split (window and stride) time frames for FFT or convolutions

pure nothrow @safe @nogc
splitFrames
(
Xs
)
(
Xs xs
,
size_t width
,
size_t stride
)

Parameters

xs Xs

input slice

width size_t

length of each segment

stride size_t

the number of skipped frames between the head of split slices

Return Value

Type: auto

slice of split (windowed and strided) slices

Examples

import numir.signal;
import mir.ndslice.topology : iota;
static immutable ys = [[0,1,2], [2,3,4]];
assert(iota(6).splitFrames(3, 2) == ys);

Meta