class Linalg
(source)
<init> |
Linalg() |
cholesky |
Cholesky decomposition. fun <T : Number> cholesky(a: KtNDArray<T>): KtNDArray<Double> |
cond |
Compute the condition number of a matrix. fun <T : Number> cond(x: KtNDArray<T>, p: Int? = null): Double |
det |
Compute the determinant of an array. fun <T : Number> det(a: KtNDArray<T>): Double |
eig |
Compute the eigenvalues and right eigenvectors of a square array. fun <T : Any> eig(a: KtNDArray<T>): Pair<KtNDArray<Double>, KtNDArray<Double>> |
eigvals |
Compute the eigenvalues of a general matrix. fun <T : Number> eigvals(a: KtNDArray<T>): KtNDArray<Double> |
eigvalsh |
Compute the eigenvalues of real symmetric matrix. fun <T : Number> eigvalsh(a: KtNDArray<T>): KtNDArray<Double> |
inv |
Compute the (multiplicative) inverse of a matrix. fun <T : Number> inv(a: KtNDArray<T>): KtNDArray<Double> |
lstsq |
Return the least-squares solution to a linear matrix equation. fun <T : Number, E : Number> lstsq(a: KtNDArray<T>, b: KtNDArray<E>, rcond: Double? = null): List<*> |
matrixPower |
Raise a square matrix to the (integer) power n, fun <T : Number> matrixPower(a: KtNDArray<T>, n: Int): KtNDArray<T> |
matrixRank |
Return matrix rank of array using SVD method. fun <T : Number> matrixRank(m: KtNDArray<T>): Int |
multiDot |
Compute the dot product of two or more arrays in a single function call, while automatically selecting the fastest evaluation order. fun <T : Number> multiDot(vararg arrays: KtNDArray<T>): KtNDArray<T> |
norm |
Matrix or vector norm. fun <T : Number> norm(x: KtNDArray<T>, ord: Int? = null): Double fun <T : Number> norm(x: KtNDArray<T>, ord: Int? = null, axis: Int): KtNDArray<Double> |
pinv |
Compute the (Moore-Penrose) pseudo-inverse of a matrix. fun <T : Number> pinv(a: KtNDArray<T>, rcond: Double = 1e-15, hermitian: Boolean = false): KtNDArray<Double> |
qr |
Compute the qr factorization of a matrix. fun <T : Any> qr(a: KtNDArray<T>, mode: String = "reduced"): Pair<KtNDArray<Double>, KtNDArray<Double>> |
slogdet |
Compute the sign and (natural) logarithm of the determinant of an array. fun <T : Any> slogdet(a: KtNDArray<T>): Pair<Double, Double> |
solve |
Solve a linear matrix equation, or system of linear scalar equations. fun <T : Number, E : Number> solve(a: KtNDArray<T>, b: KtNDArray<E>): KtNDArray<Double> |
svd |
Singular Value Decomposition. fun <T : Any> svd(a: KtNDArray<T>, fullMatrices: Boolean = true, computeUV: Boolean = true, hermitian: Boolean = false): List<KtNDArray<Double>> |