Package-level declarations

Types

Link copied to clipboard
typealias BinarySearchComparator<T, D> = (target: T, item: D) -> Double

The comparator function for performing binary searches.

Properties

Functions

Link copied to clipboard
fun <T, D> binarySearchExact(target: T, list: ArrayList<D>, comparator: BinarySearchComparator<T, D>): Int

Perform a binary search for an item that matches exactly.

Link copied to clipboard
fun <T, D> binarySearchExactOrRightAbove(target: T, list: ArrayList<D>, comparator: BinarySearchComparator<T, D>): Int

Perform a binary search for an item that matches exactly or has value right above the target.

Link copied to clipboard
fun <T, D> binarySearchExactOrRightBelow(target: T, list: ArrayList<D>, comparator: BinarySearchComparator<T, D>): Int

Perform a binary search for an item that matches exactly or has value right below the target.