filterWindowedEnclosing
Filters out all elements, when the predicate with windowSize is matching.
Receiver
list on which the window filter is applied
Return
list without elements which match the predicate
Parameters
windowSize
size of the window
predicate
if the predicate returns true, all elements are filtered out
fun <T> List<T>.filterWindowedEnclosing(dropIndices: List<Boolean>, predicate: (List<T>) -> Boolean): List<T>
Filter windows that follow which match the predicate. The filter window is executed enclosing the list.
Example Given a list: A, A, B, C, A Predicate: it0 == it1 DropIndices: (true, false) -> A, B, C (edge pattern also dropped) DropIndices: (false, true) -> A, B, C, A (edge pattern not dropped)
Receiver
list on which the window filter is applied
Return
list without elements which match the predicate
Parameters
predicate
if the predicate returns true, the indices are dropped according to the dropIndices