Package-level declarations

Common tools used by operations and timeline constructors to sanitize and process lists.

Functions

Link copied to clipboard
fun <I : IntervalLike<I>> coalesceList(list: List<I>, shouldCoalesce: I.(I) -> Boolean): List<I>

Flattens overlapping segments into non-overlapping segments with unequal consecutive values.

Link copied to clipboard
fun <I : IntervalLike<I>> listCollector(list: List<I>, isSorted: Boolean = false, isSerial: Boolean = false): (CollectOptions) -> List<I>

Returns a function that lazily truncates a given list of timeline objects to the bounds.

Link copied to clipboard
fun <LEFT : IntervalLike<LEFT>, RIGHT : IntervalLike<RIGHT>, OUT : IntervalLike<OUT>> map2ParallelLists(left: List<LEFT>, right: List<RIGHT>, isLeftSorted: Boolean, isRightSorted: Boolean, op: (LEFT, RIGHT, Interval) -> OUT?): List<OUT>

Low-level routine for performing a binary operation on a pair of parallel lists.

Link copied to clipboard

Low level routine for performing a binary operation on a pair of segment lists.

Link copied to clipboard
fun <I : IntervalLike<I>> maybeCoalesce(list: List<I>, shouldCoalesce: I.(I) -> Boolean?): List<I>

Coalesces a list if the provided shouldCoalesce function is not null.

Link copied to clipboard
fun <V : IntervalLike<V>> preprocessList(list: List<V>, shouldCoalesce: V.(V) -> Boolean?): (CollectOptions) -> List<V>

Sanitizes a list of IntervalLike objects for use in a timeline.

Link copied to clipboard
fun <I : IntervalLike<I>> List<I>.sorted(): List<I>

Returns a new list of intervals, sorted by start time, or end time in case of a tie.

Link copied to clipboard
fun <I : IntervalLike<I>> truncateList(list: List<I>, opts: CollectOptions, exploitSorted: Boolean, isSerial: Boolean): List<I>

Eagerly truncates a list of timeline objects to known bounds.