Package-level declarations

Types

Link copied to clipboard
internal data class BasicStats(val count: Int, val mean: Double, val variance: Double)
Link copied to clipboard
internal data class IndexedComparable<T : Comparable<T>>(val index: Int, val value: T) : Comparable<IndexedComparable<T>>
Link copied to clipboard
internal sealed interface QuantileEstimationMethod<Value : Comparable<Value>, Index : Number>

Inspired by Hyndman and Fan (1996) Sample Quantiles in Statistical Packages. The American Statistician, 50, 361-365. DOI:10.1080/00031305.1996.10473566

Properties

Link copied to clipboard

Double(?) -> Double Float(?) -> Float Short(?), Byte(?) -> Int(?) T : Number(?) -> T(?)

Link copied to clipboard

T: Comparable -> T(?)

Link copied to clipboard

T: Number? -> Double

Link copied to clipboard

Primitive Number -> Double? T : Comparable -> T?

Link copied to clipboard

T: Comparable -> T(?)

Link copied to clipboard
Link copied to clipboard

T: Number? -> Double

Link copied to clipboard

T: Number -> T Byte -> Int Short -> Int Nothing -> Double

Functions

Link copied to clipboard
internal fun Sequence<Double>.calculateBasicStatsOrNull(skipNaN: Boolean = skipNaNDefault): BasicStats?

Creates BasicStats instance for this sequence.

Link copied to clipboard
Link copied to clipboard
@JvmName(name = "byteCumsum")
internal fun DataColumn<Byte>.cumSumImpl(): DataColumn<Int>
@JvmName(name = "intCumsum")
internal fun DataColumn<Int>.cumSumImpl(): DataColumn<Int>
@JvmName(name = "longCumsum")
internal fun DataColumn<Long>.cumSumImpl(): DataColumn<Long>
@JvmName(name = "shortCumsum")
internal fun DataColumn<Short>.cumSumImpl(): DataColumn<Int>
@JvmName(name = "cumsumByteNullable")
internal fun DataColumn<Byte?>.cumSumImpl(skipNA: Boolean): DataColumn<Int?>
@JvmName(name = "cumsumDoubleNullable")
internal fun DataColumn<Double?>.cumSumImpl(skipNA: Boolean): DataColumn<Double>
@JvmName(name = "doubleCumsum")
internal fun DataColumn<Double>.cumSumImpl(skipNA: Boolean): DataColumn<Double>
@JvmName(name = "floatCumsum")
internal fun DataColumn<Float>.cumSumImpl(skipNA: Boolean): DataColumn<Float>
@JvmName(name = "intCumsum")
internal fun DataColumn<Int?>.cumSumImpl(skipNA: Boolean): DataColumn<Int?>
@JvmName(name = "cumsumLongNullable")
internal fun DataColumn<Long?>.cumSumImpl(skipNA: Boolean): DataColumn<Long?>
@JvmName(name = "cumsumShortNullable")
internal fun DataColumn<Short?>.cumSumImpl(skipNA: Boolean): DataColumn<Int?>
internal fun DataColumn<Number?>.cumSumImpl(type: KType, skipNA: Boolean): DataColumn<Number?>
Link copied to clipboard
internal fun <C : Comparable<C>> Sequence<C?>.indexOfMax(type: KType, skipNaN: Boolean): Int
Link copied to clipboard
internal fun <T : Comparable<T & Any>?> Sequence<T>.indexOfMedian(type: KType, skipNaN: Boolean): Int

Returns the index of the median in the comparable input:

Link copied to clipboard
internal fun <C : Comparable<C>> Sequence<C?>.indexOfMin(type: KType, skipNaN: Boolean): Int
Link copied to clipboard
internal fun <T : Comparable<T & Any>?> Sequence<T>.indexOfPercentile(percentile: Double, type: KType, skipNaN: Boolean): Int

Returns the index of the percentile in the unsorted sequence this. If !skipNaN and the sequence this contains NaN, the index of the first NaN will be returned. Returns -1 if the sequence is empty.

Link copied to clipboard
Link copied to clipboard
internal fun <T : Comparable<T>> Sequence<T>.maxOrNull(type: KType, skipNaN: Boolean): T?
Link copied to clipboard
internal fun Sequence<Double>.mean(skipNaN: Boolean = skipNaNDefault): Double
internal fun <T : Number> Sequence<T>.mean(type: KType, skipNaN: Boolean): Double
Link copied to clipboard
internal fun <T : Comparable<T>> Sequence<T>.medianOrNull(type: KType, skipNaN: Boolean): Any?

Returns the median of the comparable input:

Link copied to clipboard
internal fun <T : Comparable<T>> Sequence<T>.minOrNull(type: KType, skipNaN: Boolean): T?
Link copied to clipboard
internal fun <T : Comparable<T>> Sequence<T>.percentileOrNull(percentile: Double, type: KType, skipNaN: Boolean): Any?
Link copied to clipboard
Link copied to clipboard
internal fun <T : Comparable<T & Any>?> Sequence<T>.quantileIndex(p: Double, type: KType, skipNaN: Boolean, method: QuantileEstimationMethod.Selecting, name: String = "quantile"): Int

Returns the index of the p-quantile in the unsorted sequence this, selected using method.

Link copied to clipboard
internal fun <T : Comparable<T>> Sequence<Any>.quantileOrNull(p: Double, type: KType, skipNaN: Boolean, method: QuantileEstimationMethod<T, *>, name: String = "quantile"): Any?

Returns the p-quantile: the k'th q-quantile, where p = k/q.

Link copied to clipboard
internal fun <T : Comparable<T>> List<T>.quickSelect(k: Int): T

Select the k't "smallest" element from list this

Link copied to clipboard
internal fun BasicStats.std(ddof: Int): Double

Calculates the standard deviation from a BasicStats with optional delta degrees of freedom.

@JvmName(name = "doubleStd")
internal fun Sequence<Double>.std(skipNaN: Boolean = skipNaNDefault, ddof: Int = ddofDefault): Double

internal fun <T : Number> Sequence<T?>.std(type: KType, skipNaN: Boolean, ddof: Int): Double

Calculates the standard deviation from this with optional delta degrees of freedom.

Link copied to clipboard
@JvmName(name = "sumNullableT")
internal fun Sequence<Number?>.sum(type: KType, skipNaN: Boolean): Number