LinAlg

interface LinAlg

Linear Algebra methods interface.

Functions

Link copied to clipboard
abstract fun <T : Number> pow(mat: MultiArray<T, D2>, n: Int): NDArray<T, D2>

Raise a square matrix to power n.

Properties

Link copied to clipboard
abstract val linAlgEx: LinAlgEx

instance of LinAlgEx

Extensions

Link copied to clipboard
@JvmName(name = "dotMMNumber")
fun <T : Number> LinAlg.dot(a: MultiArray<T, D2>, b: MultiArray<T, D2>): NDArray<T, D2>

Dot products of two number matrices.

@JvmName(name = "dotMMComplex")
fun <T : Complex> LinAlg.dot(a: MultiArray<T, D2>, b: MultiArray<T, D2>): NDArray<T, D2>

Dot products of two complex matrices.

@JvmName(name = "dotMVNumber")
fun <T : Number> LinAlg.dot(a: MultiArray<T, D2>, b: MultiArray<T, D1>): NDArray<T, D1>

Dot products of number matrix and number vector.

@JvmName(name = "dotMVComplex")
fun <T : Complex> LinAlg.dot(a: MultiArray<T, D2>, b: MultiArray<T, D1>): NDArray<T, D1>

Dot products of complex matrix and complex vector.

@JvmName(name = "dotVVNumber")
fun <T : Number> LinAlg.dot(a: MultiArray<T, D1>, b: MultiArray<T, D1>): T

Dot products of two number vectors. Scalar product.

@JvmName(name = "dotVVComplex")
fun <T : Complex> LinAlg.dot(a: MultiArray<T, D1>, b: MultiArray<T, D1>): T

Dot products of two complex vectors. Scalar product.

Link copied to clipboard
@JvmName(name = "eigF")
fun LinAlg.eig(mat: MultiArray<Float, D2>): Pair<D1Array<ComplexFloat>, D2Array<ComplexFloat>>

Calculates the eigenvalues and eigenvectors of a float matrix

@JvmName(name = "eig")
fun <T : Number> LinAlg.eig(mat: MultiArray<T, D2>): Pair<D1Array<ComplexDouble>, D2Array<ComplexDouble>>

Calculates the eigenvalues and eigenvectors of a numeric matrix

@JvmName(name = "eigC")
fun <T : Complex> LinAlg.eig(mat: MultiArray<T, D2>): Pair<D1Array<T>, D2Array<T>>

Calculates the eigenvalues and eigenvectors of a complex matrix

Link copied to clipboard
@JvmName(name = "eigValsF")
fun LinAlg.eigVals(mat: MultiArray<Float, D2>): D1Array<ComplexFloat>
@JvmName(name = "eigValsC")
fun <T : Complex> LinAlg.eigVals(mat: MultiArray<T, D2>): D1Array<T>

Calculates the eigenvalues of a float matrix

@JvmName(name = "eigVals")
fun <T : Number> LinAlg.eigVals(mat: MultiArray<T, D2>): D1Array<ComplexDouble>

Calculates the eigenvalues of a numeric matrix.

Link copied to clipboard
@JvmName(name = "invF")
fun LinAlg.inv(mat: MultiArray<Float, D2>): NDArray<Float, D2>

Returns inverse float matrix

@JvmName(name = "invD")
fun <T : Number> LinAlg.inv(mat: MultiArray<T, D2>): NDArray<Double, D2>

Returns inverse of a double matrix from numeric matrix

@JvmName(name = "invC")
fun <T : Complex> LinAlg.inv(mat: MultiArray<T, D2>): NDArray<T, D2>

Returns inverse complex matrix

Link copied to clipboard
@JvmName(name = "normF")
fun LinAlg.norm(mat: MultiArray<Float, D2>, norm: Norm = Norm.Fro): Float

Returns norm of float matrix

@JvmName(name = "normD")
fun LinAlg.norm(mat: MultiArray<Double, D2>, norm: Norm = Norm.Fro): Double

Returns norm of double matrix

Link copied to clipboard
@JvmName(name = "pluF")
fun LinAlg.plu(mat: MultiArray<Float, D2>): Triple<D2Array<Float>, D2Array<Float>, D2Array<Float>>

Returns PLU decomposition of the float matrix

@JvmName(name = "pluD")
fun <T : Number> LinAlg.plu(mat: MultiArray<T, D2>): Triple<D2Array<Double>, D2Array<Double>, D2Array<Double>>

Returns PLU decomposition of the numeric matrix

@JvmName(name = "pluC")
fun <T : Complex> LinAlg.plu(mat: MultiArray<T, D2>): Triple<D2Array<T>, D2Array<T>, D2Array<T>>

Returns PLU decomposition of the complex matrix

Link copied to clipboard
@JvmName(name = "qrF")
fun LinAlg.qr(mat: MultiArray<Float, D2>): Pair<D2Array<Float>, D2Array<Float>>

Returns QR decomposition of the float matrix

@JvmName(name = "qrD")
fun <T : Number> LinAlg.qr(mat: MultiArray<T, D2>): Pair<D2Array<Double>, D2Array<Double>>

Returns QR decomposition of the numeric matrix

@JvmName(name = "qrC")
fun <T : Complex> LinAlg.qr(mat: MultiArray<T, D2>): Pair<D2Array<T>, D2Array<T>>

Returns QR decomposition of the complex matrix

Link copied to clipboard
@JvmName(name = "solveF")
fun <D : Dim2> LinAlg.solve(a: MultiArray<Float, D2>, b: MultiArray<Float, D>): NDArray<Float, D>
@JvmName(name = "solveD")
fun <T : Number, D : Dim2> LinAlg.solve(a: MultiArray<T, D2>, b: MultiArray<T, D>): NDArray<Double, D>
@JvmName(name = "solveC")
fun <T : Complex, D : Dim2> LinAlg.solve(a: MultiArray<T, D2>, b: MultiArray<T, D>): NDArray<T, D>

Solves a linear matrix equation, or system of linear scalar equations.