BufferMatrixContext

class BufferMatrixContext<T : Any, R : Ring<T>>(elementContext: R, bufferFactory: BufferFactory<T>) : GenericMatrixContext<T, R, BufferMatrix<T>>

Basic implementation of Matrix space based on NDStructure

Constructors

BufferMatrixContext
Link copied to clipboard
common
fun <R : Ring<T>> BufferMatrixContext(elementContext: R, bufferFactory: BufferFactory<T>)

Types

Companion
Link copied to clipboard
common
object Companion

Functions

add
Link copied to clipboard
common
open override fun add(a: Matrix<T>, b: Matrix<T>): BufferMatrix<T>
Addition of two elements.
binaryOperation
Link copied to clipboard
common
open fun binaryOperation(operation: String, left: Matrix<T>, right: Matrix<T>): Matrix<T>
Dynamically invokes a binary operation with the certain name.
binaryOperationFunction
Link copied to clipboard
common
open override fun binaryOperationFunction(operation: String): (Matrix<T>, Matrix<T>) -> BufferMatrix<T>
Dynamically dispatches a binary operation with the certain name.
bindSymbol
Link copied to clipboard
common
open fun bindSymbol(value: String): Matrix<T>
Wraps a raw string to T object.
div
Link copied to clipboard
common
open operator fun Matrix<T>.div(k: Number): Matrix<T>
Division of this element by scalar.
dot
Link copied to clipboard
common
open infix override fun Matrix<T>.dot(other: Matrix<T>): BufferMatrix<T>
Computes the dot product of this matrix and another one.
open infix override fun Matrix<T>.dot(vector: Point<T>): Point<T>
Computes the dot product of this matrix and a vector.
equals
Link copied to clipboard
common
open operator fun equals(other: Any?): Boolean
getFeature
Link copied to clipboard
common
open fun <F : Any> getFeature(m: Matrix<T>, type: KClass<F>): F?
Gets a feature from the matrix.
hashCode
Link copied to clipboard
common
open fun hashCode(): Int
minus
Link copied to clipboard
common
open operator override fun Matrix<T>.minus(b: Matrix<T>): BufferMatrix<T>
Subtraction of two elements.
multiply
Link copied to clipboard
common
open override fun multiply(a: Matrix<T>, k: Number): BufferMatrix<T>
Multiplication of element by scalar.
one
Link copied to clipboard
common
fun one(rows: Int, columns: Int): Matrix<Double>
plus
Link copied to clipboard
common
open operator fun Matrix<T>.plus(b: Matrix<T>): Matrix<T>
Addition of two elements.
point
Link copied to clipboard
common
open override fun point(size: Int, initializer: (Int) -> T): Point<T>
Produces a point compatible with matrix space (and possibly optimized for it).
produce
Link copied to clipboard
common
open override fun produce(rows: Int, columns: Int, initializer: (i: Int, j: Int) -> T): BufferMatrix<T>
Produces a matrix with this context and given dimensions.
times
Link copied to clipboard
common
open operator override fun Matrix<T>.times(value: T): BufferMatrix<T>
Multiplies a matrix by its element.
open operator fun T.times(m: Matrix<T>): BufferMatrix<T>
Multiplies an element by a matrix of it.
open operator fun Number.times(b: Matrix<T>): Matrix<T>
Multiplication of this number by element.
open operator fun Matrix<T>.times(k: Number): Matrix<T>
Multiplication of this element by a scalar.
toString
Link copied to clipboard
common
open fun toString(): String
unaryMinus
Link copied to clipboard
common
open operator override fun Matrix<T>.unaryMinus(): BufferMatrix<T>
The negation of this element.
unaryOperation
Link copied to clipboard
common
open fun unaryOperation(operation: String, arg: Matrix<T>): Matrix<T>
Dynamically invokes an unary operation with the certain name.
unaryOperationFunction
Link copied to clipboard
common
open override fun unaryOperationFunction(operation: String): (Matrix<T>) -> Matrix<T>
Dynamically dispatches an unary operation with the certain name.
unaryPlus
Link copied to clipboard
common
open operator fun Matrix<T>.unaryPlus(): Matrix<T>
Returns this value.

Properties

elementContext
Link copied to clipboard
common
open override val elementContext: R
The ring over matrix elements.