Package space.kscience.kmath.real

Types

Link copied to clipboard
typealias DoubleVector = Point<Double>
Link copied to clipboard
typealias RealMatrix = Matrix<Double>

Functions

Link copied to clipboard
inline fun RealMatrix.appendColumn(crossinline mapper: (Buffer<Double>) -> Double): RealMatrix
Link copied to clipboard
fun RealMatrix.average(): Double
Link copied to clipboard
fun RealMatrix.averageByColumn(): DoubleBuffer
Link copied to clipboard
fun cos(arg: RealMatrix): RealMatrix
fun cos(vector: DoubleVector): DoubleVector
Link copied to clipboard
operator fun Number.div(vector: DoubleVector): DoubleVector
operator fun RealMatrix.div(double: Double): RealMatrix
operator fun DoubleVector.div(number: Number): DoubleVector
operator fun DoubleVector.div(other: DoubleVector): DoubleVector
Link copied to clipboard
infix fun Matrix<Double>.dot(other: Matrix<Double>): Matrix<Double>

Optimized dot product for real matrices

Link copied to clipboard
fun DoubleVector(vararg doubles: Double): DoubleVector
Link copied to clipboard
fun exp(arg: RealMatrix): RealMatrix
fun exp(vector: DoubleVector): DoubleVector
Link copied to clipboard
fun RealMatrix.extractColumn(columnIndex: Int): RealMatrix
Link copied to clipboard
fun RealMatrix.extractColumns(columnRange: IntRange): RealMatrix
Link copied to clipboard
fun Buffer.Companion.fromRange(range: ClosedFloatingPointRange<Double>, numberOfPoints: Int): DoubleBuffer

Create a Buffer-based grid with equally distributed numberOfPoints points. The range could be increasing or decreasing. If range has a zero size, then the buffer consisting of numberOfPoints equal values is returned.

Link copied to clipboard
fun RealMatrix.inverseWithLup(): RealMatrix

Inverse a square real matrix using LUP decomposition

Link copied to clipboard
operator fun (Double) -> Double.invoke(elementND: BufferND<Double>): BufferND<Double>

Element by element application of any operation on elements to the whole array. Just like in numpy.

Link copied to clipboard
fun ln(arg: RealMatrix): RealMatrix
fun ln(vector: DoubleVector): DoubleVector
Link copied to clipboard
fun log10(arg: RealMatrix): RealMatrix
fun log10(vector: DoubleVector): DoubleVector
Link copied to clipboard
inline fun RealMatrix.map(crossinline transform: (Double) -> Double): RealMatrix
inline fun DoubleVector.map(transform: (Double) -> Double): DoubleVector
Link copied to clipboard
inline fun DoubleVector.mapIndexed(transform: (index: Int, value: Double) -> Double): DoubleVector
Link copied to clipboard
inline fun BufferND<Double>.mapInline(crossinline transform: DoubleField.(Double) -> Double): BufferND<Double>

Map one BufferND using function without indices.

Link copied to clipboard
fun RealMatrix.max(): Double?
Link copied to clipboard
fun RealMatrix.maxByColumn(): DoubleBuffer
Link copied to clipboard
fun RealMatrix.min(): Double?
Link copied to clipboard
fun RealMatrix.minByColumn(): DoubleBuffer
Link copied to clipboard
operator fun Double.minus(matrix: RealMatrix): RealMatrix
operator fun Number.minus(vector: DoubleVector): DoubleVector
operator fun RealMatrix.minus(double: Double): RealMatrix
operator fun RealMatrix.minus(other: RealMatrix): RealMatrix
operator fun DoubleVector.minus(number: Number): DoubleVector
operator fun DoubleVector.minus(other: DoubleVector): DoubleVector

operator fun BufferND<Double>.minus(arg: Double): BufferND<Double>

Subtraction operation between BufferND and single element

Link copied to clipboard
operator fun Double.plus(matrix: RealMatrix): RealMatrix
operator fun Number.plus(vector: DoubleVector): DoubleVector
operator fun RealMatrix.plus(double: Double): RealMatrix
operator fun RealMatrix.plus(other: RealMatrix): RealMatrix
operator fun DoubleVector.plus(number: Number): DoubleVector
operator fun DoubleVector.plus(other: DoubleVector): DoubleVector

operator fun BufferND<Double>.plus(arg: Double): BufferND<Double>

Summation operation for BufferND and single element

Link copied to clipboard
fun RealMatrix.pow(p: Double): RealMatrix
fun RealMatrix.pow(p: Int): RealMatrix
fun DoubleVector.pow(p: Double): DoubleVector
fun DoubleVector.pow(p: Int): DoubleVector
Link copied to clipboard
fun realMatrix(rowNum: Int, colNum: Int): MatrixBuilder<Double, DoubleField>
fun realMatrix(rowNum: Int, colNum: Int, initializer: DoubleField.(i: Int, j: Int) -> Double): RealMatrix
Link copied to clipboard
fun RealMatrix.repeatStackVertical(n: Int): RealMatrix
Link copied to clipboard
fun Buffer.Companion.same(size: Int, value: Number): DoubleVector

Fill the vector with given size with given value

Link copied to clipboard
fun sin(arg: RealMatrix): RealMatrix
fun sin(vector: DoubleVector): DoubleVector
Link copied to clipboard
fun sqrt(arg: RealMatrix): RealMatrix
fun sqrt(vector: DoubleVector): DoubleVector
Link copied to clipboard
fun RealMatrix.square(): RealMatrix
fun DoubleVector.square(): DoubleVector
Link copied to clipboard
infix fun ClosedFloatingPointRange<Double>.step(step: Double): DoubleBuffer

Convert double range to sequence.

Link copied to clipboard
fun RealMatrix.sum(): Double
fun DoubleVector.sum(): Double
Link copied to clipboard
fun RealMatrix.sumByColumn(): DoubleBuffer
Link copied to clipboard
fun tan(arg: RealMatrix): RealMatrix
fun tan(vector: DoubleVector): DoubleVector
Link copied to clipboard
operator fun Double.times(matrix: RealMatrix): RealMatrix
operator fun Number.times(vector: DoubleVector): DoubleVector
operator fun RealMatrix.times(double: Double): RealMatrix
operator fun RealMatrix.times(other: RealMatrix): RealMatrix
operator fun DoubleVector.times(number: Number): DoubleVector
operator fun DoubleVector.times(other: DoubleVector): DoubleVector
Link copied to clipboard
fun Array<DoubleArray>.toMatrix(): RealMatrix
fun Sequence<DoubleArray>.toMatrix(): RealMatrix
Link copied to clipboard
operator fun DoubleVector.unaryMinus(): Buffer<Double>
Link copied to clipboard
fun Buffer.Companion.withFixedStep(range: ClosedFloatingPointRange<Double>, step: Double): DoubleBuffer

Create a Buffer-based grid with equally distributed points with a fixed step. The range could be increasing or decreasing. If the step is larger than the range size, single point is returned.

Properties

Link copied to clipboard
val ClosedFloatingPointRange<Double>.length: Double
Link copied to clipboard
val DoubleVector.norm: Double