for Each Window Indexed
inline fun IntList.forEachWindowIndexed(windowSize: Int, step: Int = 1, partialWindows: Boolean = false, action: (index: Int, InPlaceIntSubList) -> Unit)(source)
inline fun LongList.forEachWindowIndexed(windowSize: Int, step: Int = 1, partialWindows: Boolean = false, action: (index: Int, InPlaceLongSubList) -> Unit)(source)
inline fun FloatList.forEachWindowIndexed(windowSize: Int, step: Int = 1, partialWindows: Boolean = false, action: (index: Int, InPlaceFloatSubList) -> Unit)(source)
inline fun DoubleList.forEachWindowIndexed(windowSize: Int, step: Int = 1, partialWindows: Boolean = false, action: (index: Int, InPlaceDoubleSubList) -> Unit)(source)
Iterates through the windows of the list with their indices and performs the given action on each window.
Parameters
window Size
The desired size of each window. Must be greater than 0.
step
The step size between consecutive windows. Must be greater than 0, Defaults to 1.
partial Windows
Whether to include partial windows at the end. Defaults to false.
action
The function to be executed for each window and its index.
Throws
if windowSize or step is less than or equal to 0.