compute

inline fun compute(data: IntArray, start: Int = 0, end: Int = data.size, out: RLE = RLE()): RLE

Generates a RLE sequence based on the data in the segment start and end. When providing out, that RLE is reused.


inline fun compute(count: Int, out: RLE = RLE(), filter: (value: Int) -> Boolean = { true }, gen: (index: Int) -> Int): RLE

Generates a new RLE or reuses out, from a sequence of count items, generated by the gen function. Emitted value can be filtered with the filter function.