MonotonicSeriesAlgebra

class MonotonicSeriesAlgebra<T, out A : Ring<T>, out BA : BufferAlgebra<T, A>, L : Comparable<L>>(bufferAlgebra: BA, offsetToLabel: (Int) -> L, labelToOffset: (L) -> Double) : SeriesAlgebra<T, A, BA, L> (source)

A SeriesAlgebra with reverse label to index transformation.

Parameters

labelToOffset

returns floating point number that is used for index resolution.

Constructors

Link copied to clipboard
constructor(bufferAlgebra: BA, offsetToLabel: (Int) -> L, labelToOffset: (L) -> Double)

Functions

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open override fun add(left: Buffer<T>, right: Buffer<T>): Series<T>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open fun binaryOperation(operation: String, left: Buffer<T>, right: Buffer<T>): Buffer<T>
Link copied to clipboard
open override fun binaryOperationFunction(operation: String): (left: Buffer<T>, right: Buffer<T>) -> Buffer<T>
Link copied to clipboard
open fun bindSymbol(value: String): Buffer<T>
Link copied to clipboard
open fun bindSymbolOrNull(value: String): Buffer<T>?
Link copied to clipboard
fun ceilOffset(label: L): Int

An offset of the given label rounded up

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun <T : Comparable<T>> StatisticalAlgebra<T, *, *>.ecdf(buffer: Buffer<T>): (T) -> Double
Link copied to clipboard
Link copied to clipboard
open fun export(arg: Buffer<T>): Buffer<T>
Link copied to clipboard
fun floorOffset(label: L): Int

An offset of the given label rounded down

Link copied to clipboard
inline fun <R> Buffer<T>.fold(initial: R, operation: A.(acc: R, T) -> R): R
Link copied to clipboard
inline fun <R> Buffer<T>.foldWithLabel(initial: R, operation: A.(acc: R, arg: T, label: L) -> R): R
Link copied to clipboard
open fun Buffer<T>.getByLabel(label: L): T

Get value by label (rounded down) or throw IndexOutOfBoundsException if the value is outside series boundaries.

Link copied to clipboard
open override fun Buffer<T>.getByLabelOrNull(label: L): T?

Get value by label (rounded down) or return null if the value is outside series boundaries.

Link copied to clipboard
fun Buffer<T>.getByOffset(index: Int): T

Get the value by absolute index in the series algebra or throw IndexOutOfBoundsException if index is out of range

Link copied to clipboard
fun Buffer<T>.getByOffsetOrNull(index: Int): T?

Get the value by absolute offset in the series algebra or return null if index is out of range

Link copied to clipboard
Link copied to clipboard

Kolmogorov-Smirnov sample comparison test Implementation copied from https://commons.apache.org/proper/commons-math/javadocs/api-3.6.1/index.html?org/apache/commons/math3/stat/inference/KolmogorovSmirnovTest.html

Link copied to clipboard
Link copied to clipboard
inline fun Buffer<T>.map(crossinline transform: A.(T) -> T): Series<T>

Map a series to another series of the same size

Link copied to clipboard
inline fun Buffer<T>.mapWithLabel(crossinline transform: A.(arg: T, label: L) -> T): Series<T>

Map series to another series of the same size with label

Link copied to clipboard
open operator fun Buffer<T>.minus(arg: Buffer<T>): Buffer<T>
Link copied to clipboard
fun Buffer<T>.moveBy(offset: Int): Series<T>

Zero-copy move Buffer or Series by given offset. If it is Series, sum intrinsic series position and the offset.

Link copied to clipboard
fun Buffer<T>.moveTo(position: Int): Series<T>

Zero-copy move Buffer or Series to given position ignoring series offset if it is present.

Link copied to clipboard
open override fun multiply(left: Buffer<T>, right: Buffer<T>): Buffer<T>
Link copied to clipboard
open operator fun Buffer<T>.plus(arg: Buffer<T>): Buffer<T>
Link copied to clipboard
fun <T, BA : BufferAlgebra<T, *>, PowerOperations<Buffer<T>>> SeriesAlgebra<T, *, BA, *>.power(arg: Buffer<T>, pow: Number): Series<T>
Link copied to clipboard
inline fun series(size: Int, startOffset: Int = 0, crossinline block: A.(label: L) -> T): Series<T>

Build a new series by label positioned at startOffset.

Link copied to clipboard
inline fun seriesByOffset(size: Int, startOffset: Int = 0, crossinline block: A.(offset: Int) -> T): Series<T>

Build a new series by offset positioned at startOffset.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open operator fun Buffer<T>.times(arg: Buffer<T>): Buffer<T>
Link copied to clipboard
open operator override fun Buffer<T>.unaryMinus(): Buffer<T>
Link copied to clipboard
open fun unaryOperation(operation: String, arg: Buffer<T>): Buffer<T>
Link copied to clipboard
open override fun unaryOperationFunction(operation: String): (arg: Buffer<T>) -> Buffer<T>
Link copied to clipboard
open operator fun Buffer<T>.unaryPlus(): Buffer<T>
Link copied to clipboard
inline fun Buffer<T>.zip(other: Buffer<T>, crossinline operation: A.(left: T, right: T) -> T): Series<T>

Zip two buffers in the range whe they overlap

Properties

Link copied to clipboard
open override val bufferAlgebra: BA
Link copied to clipboard
Link copied to clipboard
open val elementAlgebra: A
Link copied to clipboard
Link copied to clipboard

Get a label buffer for given buffer.

Link copied to clipboard

A range of valid offset indices. In general, does not start with zero.

Link copied to clipboard
val offsetToLabel: (Int) -> L
Link copied to clipboard
Link copied to clipboard

An offset of the buffer start relative to SeriesAlgebra zero offset