Package-level declarations

Types

Link copied to clipboard
class BitArray

A class representing a bit array where each bit is stored as a boolean value in a compact, memory-efficient manner. The boolean values are packed into integers, with each integer representing 32 bits. This class provides methods to set and get the boolean values at specific indices, as well as perform various operations on the array.

Functions

Link copied to clipboard
inline fun <T> Array<T>.atLeast(n: Int, predicate: (T) -> Boolean): Boolean
inline fun DoubleArray.atLeast(n: Int, predicate: (Double) -> Boolean): Boolean
inline fun FloatArray.atLeast(n: Int, predicate: (Float) -> Boolean): Boolean
inline fun IntArray.atLeast(n: Int, predicate: (Int) -> Boolean): Boolean
inline fun LongArray.atLeast(n: Int, predicate: (Long) -> Boolean): Boolean

Returns true if at least n elements in the list match the given predicate.

Link copied to clipboard
inline fun <T> Array<T>.atMost(n: Int, predicate: (T) -> Boolean): Boolean
inline fun DoubleArray.atMost(n: Int, predicate: (Double) -> Boolean): Boolean
inline fun FloatArray.atMost(n: Int, predicate: (Float) -> Boolean): Boolean
inline fun IntArray.atMost(n: Int, predicate: (Int) -> Boolean): Boolean
inline fun LongArray.atMost(n: Int, predicate: (Long) -> Boolean): Boolean

Returns true if at most n elements in the list match the given predicate.

Link copied to clipboard

Returns a DoubleList containing all elements except first n elements.

Returns a FloatList containing all elements except first n elements.

Returns a IntList containing all elements except first n elements.

Returns a LongList containing all elements except first n elements.

Link copied to clipboard

Returns a DoubleList containing all elements except last n elements.

Returns a FloatList containing all elements except last n elements.

Returns a IntList containing all elements except last n elements.

Returns a LongList containing all elements except last n elements.

Link copied to clipboard
inline fun Array<Double>.filter(predicate: (Double) -> Boolean): DoubleList

Returns a DoubleList containing only elements that, when transformed, match the predicate.

inline fun Array<Float>.filter(predicate: (Float) -> Boolean): FloatList

Returns a FloatList containing only elements that, when transformed, match the predicate.

inline fun Array<Int>.filter(predicate: (Int) -> Boolean): IntList

Returns a IntList containing only elements that, when transformed, match the predicate.

inline fun Array<Long>.filter(predicate: (Long) -> Boolean): LongList

Returns a LongList containing only elements that, when transformed, match the predicate.

inline fun DoubleArray.filter(predicate: (Double) -> Boolean): DoubleList

Returns a DoubleList containing only elements matching the given predicate.

inline fun FloatArray.filter(predicate: (Float) -> Boolean): FloatList

Returns a FloatList containing only elements matching the given predicate.

inline fun IntArray.filter(predicate: (Int) -> Boolean): IntList

Returns a IntList containing only elements matching the given predicate.

inline fun LongArray.filter(predicate: (Long) -> Boolean): LongList

Returns a LongList containing only elements matching the given predicate.

Link copied to clipboard
inline fun Array<Double>.filterArray(predicate: (Double) -> Boolean): DoubleArray

Returns a DoubleArray containing only elements that, when transformed, match the predicate.

inline fun Array<Float>.filterArray(predicate: (Float) -> Boolean): FloatArray

Returns a FloatArray containing only elements that, when transformed, match the predicate.

inline fun Array<Int>.filterArray(predicate: (Int) -> Boolean): IntArray

Returns a IntArray containing only elements that, when transformed, match the predicate.

inline fun Array<Long>.filterArray(predicate: (Long) -> Boolean): LongArray

Returns a LongArray containing only elements that, when transformed, match the predicate.

inline fun DoubleArray.filterArray(predicate: (Double) -> Boolean): DoubleArray

Returns a DoubleArray containing only elements matching the given predicate.

inline fun FloatArray.filterArray(predicate: (Float) -> Boolean): FloatArray

Returns a FloatArray containing only elements matching the given predicate.

inline fun IntArray.filterArray(predicate: (Int) -> Boolean): IntArray

Returns a IntArray containing only elements matching the given predicate.

inline fun LongArray.filterArray(predicate: (Long) -> Boolean): LongArray

Returns a LongArray containing only elements matching the given predicate.

Link copied to clipboard
inline fun <T> Array<T>.map(transform: (T) -> Double): DoubleList

Returns a DoubleList containing the results of applying the given transform function to each element in the original Array.

inline fun <T> Array<T>.map(transform: (T) -> Float): FloatList

Returns a FloatList containing the results of applying the given transform function to each element in the original Array.

inline fun <T> Array<T>.map(transform: (T) -> Int): IntList

Returns a IntList containing the results of applying the given transform function to each element in the original Array.

inline fun <T> Array<T>.map(transform: (T) -> Long): LongList

Returns a LongList containing the results of applying the given transform function to each element in the original Array.

inline fun DoubleArray.map(transform: (Double) -> Double): DoubleList

Returns a DoubleList containing the results of applying the given transform function to each element in the original array.

inline fun DoubleArray.map(transform: (Double) -> Float): FloatList

Returns a FloatList containing the results of applying the given transform function to each element in the original DoubleArray.

inline fun DoubleArray.map(transform: (Double) -> Int): IntList

Returns a IntList containing the results of applying the given transform function to each element in the original DoubleArray.

inline fun DoubleArray.map(transform: (Double) -> Long): LongList

Returns a LongList containing the results of applying the given transform function to each element in the original DoubleArray.

inline fun FloatArray.map(transform: (Float) -> Double): DoubleList

Returns a DoubleList containing the results of applying the given transform function to each element in the original FloatArray.

inline fun FloatArray.map(transform: (Float) -> Float): FloatList

Returns a FloatList containing the results of applying the given transform function to each element in the original array.

inline fun FloatArray.map(transform: (Float) -> Int): IntList

Returns a IntList containing the results of applying the given transform function to each element in the original FloatArray.

inline fun FloatArray.map(transform: (Float) -> Long): LongList

Returns a LongList containing the results of applying the given transform function to each element in the original FloatArray.

inline fun IntArray.map(transform: (Int) -> Double): DoubleList

Returns a DoubleList containing the results of applying the given transform function to each element in the original IntArray.

inline fun IntArray.map(transform: (Int) -> Float): FloatList

Returns a FloatList containing the results of applying the given transform function to each element in the original IntArray.

inline fun IntArray.map(transform: (Int) -> Int): IntList

Returns a IntList containing the results of applying the given transform function to each element in the original array.

inline fun IntArray.map(transform: (Int) -> Long): LongList

Returns a LongList containing the results of applying the given transform function to each element in the original IntArray.

inline fun LongArray.map(transform: (Long) -> Double): DoubleList

Returns a DoubleList containing the results of applying the given transform function to each element in the original LongArray.

inline fun LongArray.map(transform: (Long) -> Float): FloatList

Returns a FloatList containing the results of applying the given transform function to each element in the original LongArray.

inline fun LongArray.map(transform: (Long) -> Int): IntList

Returns a IntList containing the results of applying the given transform function to each element in the original LongArray.

inline fun LongArray.map(transform: (Long) -> Long): LongList

Returns a LongList containing the results of applying the given transform function to each element in the original array.

Link copied to clipboard
inline fun <T> Array<T>.mapArray(transform: (T) -> Double): DoubleArray

Returns a DoubleArray containing the results of applying the given transform function to each element in the original Array.

inline fun <T> Array<T>.mapArray(transform: (T) -> Float): FloatArray

Returns a FloatArray containing the results of applying the given transform function to each element in the original Array.

inline fun <T> Array<T>.mapArray(transform: (T) -> Int): IntArray

Returns a IntArray containing the results of applying the given transform function to each element in the original Array.

inline fun <T> Array<T>.mapArray(transform: (T) -> Long): LongArray

Returns a LongArray containing the results of applying the given transform function to each element in the original Array.

inline fun DoubleArray.mapArray(transform: (Double) -> Double): DoubleArray

Returns a DoubleArray containing the results of applying the given transform function to each element in the original array.

inline fun DoubleArray.mapArray(transform: (Double) -> Float): FloatArray

Returns a FloatArray containing the results of applying the given transform function to each element in the original DoubleArray.

inline fun DoubleArray.mapArray(transform: (Double) -> Int): IntArray

Returns a IntArray containing the results of applying the given transform function to each element in the original DoubleArray.

inline fun DoubleArray.mapArray(transform: (Double) -> Long): LongArray

Returns a LongArray containing the results of applying the given transform function to each element in the original DoubleArray.

inline fun FloatArray.mapArray(transform: (Float) -> Double): DoubleArray

Returns a DoubleArray containing the results of applying the given transform function to each element in the original FloatArray.

inline fun FloatArray.mapArray(transform: (Float) -> Float): FloatArray

Returns a FloatArray containing the results of applying the given transform function to each element in the original array.

inline fun FloatArray.mapArray(transform: (Float) -> Int): IntArray

Returns a IntArray containing the results of applying the given transform function to each element in the original FloatArray.

inline fun FloatArray.mapArray(transform: (Float) -> Long): LongArray

Returns a LongArray containing the results of applying the given transform function to each element in the original FloatArray.

inline fun IntArray.mapArray(transform: (Int) -> Double): DoubleArray

Returns a DoubleArray containing the results of applying the given transform function to each element in the original IntArray.

inline fun IntArray.mapArray(transform: (Int) -> Float): FloatArray

Returns a FloatArray containing the results of applying the given transform function to each element in the original IntArray.

inline fun IntArray.mapArray(transform: (Int) -> Int): IntArray

Returns a IntArray containing the results of applying the given transform function to each element in the original array.

inline fun IntArray.mapArray(transform: (Int) -> Long): LongArray

Returns a LongArray containing the results of applying the given transform function to each element in the original IntArray.

inline fun LongArray.mapArray(transform: (Long) -> Double): DoubleArray

Returns a DoubleArray containing the results of applying the given transform function to each element in the original LongArray.

inline fun LongArray.mapArray(transform: (Long) -> Float): FloatArray

Returns a FloatArray containing the results of applying the given transform function to each element in the original LongArray.

inline fun LongArray.mapArray(transform: (Long) -> Int): IntArray

Returns a IntArray containing the results of applying the given transform function to each element in the original LongArray.

inline fun LongArray.mapArray(transform: (Long) -> Long): LongArray

Returns a LongArray containing the results of applying the given transform function to each element in the original array.

Link copied to clipboard

Returns a DoubleList containing first n elements.

Returns a FloatList containing first n elements.

Returns a IntList containing first n elements.

Returns a LongList containing first n elements.

Link copied to clipboard

Returns a DoubleList containing last n elements.

Returns a FloatList containing last n elements.

Returns a IntList containing last n elements.

Returns a LongList containing last n elements.