kaleidic.lubeck

Lubeck - Linear Algebra

Public Imports

mir.lapack
public import mir.lapack : lapackint;

Members

Aliases

BlasType
alias BlasType(Iterators...) = CommonType!(staticMap!(IterationType, Iterators))

Gets the type that can be used with Blas routines that all types can be implicitly converted to.

Enums

fastmath
anonymousenum fastmath
Undocumented in source.

Functions

choleskyDecomp
auto choleskyDecomp(char uplo, Slice!(Iterator, 2, kind) a)

Computs Cholesky decomposition of symmetric positive definite matrix 'A'. The factorization has the form: \A = U**T * U, if UPLO = 'U', or \A = L * L**T, if UPLO = 'L' Where U is an upper triangular matrix and L is lower triangular.

choleskySolve
auto choleskySolve(char uplo, Slice!(IteratorC, 2, Canonical) c, Slice!(IteratorB, N, kindB) b)

Solves a system of linear equations A * X = B with a symmetric matrix A using the Cholesky factorization: \A = U**T * U or \A = L * L**T computed by choleskyDecomp.

cov
Slice!(BlasType!Iterator*, 2) cov(Slice!(Iterator, 2, kind) matrix)

Covariance matrix.

det
auto det(Slice!(Iterator, 2, kind) a)

Matrix determinant.

detSymmetric
auto detSymmetric(char store, Slice!(Iterator, 2, kind) a)

Matrix determinant.

eigSymmetric
auto eigSymmetric(char store, Slice!(Iterator, 2, kind) a)

Eigenvalues and eigenvectors of symmetric matrix.

inv
auto inv(Slice!(Iterator, 2, kind) a)

Calculates the inverse of a matrix.

ldlDecomp
auto ldlDecomp(char uplo, Slice!(Iterator, 2, kind) a)

Computes the factorization of a real symmetric matrix A using the Bunch-Kaufman diagonal pivoting method. The for of the factorization is: \A = L*D*L**T Where L is product if permutation and unit lower triangular matrices, and D is symmetric and block diagonal with '1 x 1' and '2 x 2' diagonal blocks.

ldlSolve
auto ldlSolve(char uplo, Slice!(IteratorA, 2, Canonical) a, Slice!(lapackint*) ipiv, Slice!(IteratorB, N, kindB) b)

Solves a system of linear equations \A * X = B with symmetric matrix 'A' using the factorization \A = U * D * U**T, or \A = L * D * L**T computed by ldlDecomp.

luDecomp
auto luDecomp(Slice!(Iterator, 2, kind) a)

Computes LU factorization of a general 'M x N' matrix 'A' using partial pivoting with row interchanges. The factorization has the form: \A = P * L * U Where P is a permutation matrix, L is lower triangular with unit diagonal elements (lower trapezoidal if m > n), and U is upper triangular (upper trapezoidal if m < n).

luSolve
auto luSolve(char trans, Slice!(IteratorLU, 2, Canonical) lut, Slice!(lapackint*) ipiv, Slice!(IteratorB, N, kindB) b)

Solves a system of linear equations \A * X = B, or \A**T * X = B with a general 'N x N' matrix 'A' using the LU factorization computed by luDecomp.

mldivide
Slice!(BlasType!(IteratorA, IteratorB)*, 2) mldivide(Slice!(IteratorA, 2, kindA) a, Slice!(IteratorB, 2, kindB) b)
Slice!(BlasType!(IteratorA, IteratorB)*) mldivide(Slice!(IteratorA, 2, kindA) a, Slice!(IteratorB, 1, kindB) b)

Solve systems of linear equations AX = B for X. Computes minimum-norm solution to a linear least squares problem if A is not a square matrix.

mtimes
Slice!(BlasType!(IteratorA, IteratorB)*, 2) mtimes(Slice!(IteratorA, 2, kindA) a, Slice!(IteratorB, 2, kindB) b)

General matrix-matrix multiplication. Allocates result to an uninitialized slice using GC.

mtimes
Slice!(BlasType!(IteratorA, IteratorB)*) mtimes(Slice!(IteratorA, 2, kindA) a, Slice!(IteratorB, 1, kindB) b)

General matrix-matrix multiplication. Allocates result to an uninitialized slice using GC.

mtimes
Slice!(BlasType!(IteratorA, IteratorB)*) mtimes(Slice!(IteratorB, 1, kindB) a, Slice!(IteratorA, 2, kindA) b)

General matrix-matrix multiplication.

mtimes
CommonType!(BlasType!IteratorA, BlasType!IteratorB) mtimes(Slice!(IteratorB, 1, kindB) a, Slice!(IteratorA, 1, kindA) b)

Vector-vector multiplication (dot product).

pca
auto pca(Slice!(Iterator, 2, kind) matrix, Flag!"centerColumns" cc)

Principal component analysis of raw data.

pinv
Slice!(BlasType!Iterator*, 2) pinv(Slice!(Iterator, 2, kind) matrix, double tolerance)

Computes Moore-Penrose pseudoinverse of matrix.

qrDecomp
auto qrDecomp(Slice!(Iterator, 2, kind) a)

Computes a QR factorization of matrix 'a'.

qrSolve
auto qrSolve(Slice!(IteratorA, 2, Canonical) a, Slice!(IteratorT) tau, Slice!(IteratorB, N, kindB) b)

Solve the least squares problem: \min ||A * X - B|| Using the QR factorization: \A = Q * R computed by qrDecomp.

svd
auto svd(Slice!(Iterator, 2, kind) matrix, Flag!"slim" slim)

Computes the singular value decomposition.

Structs

EigSymmetricResult
struct EigSymmetricResult(T)

Eigenvalues and eigenvectors POD.

LDLResult
struct LDLResult(T)

Consist LDL factorization;

LUResult
struct LUResult(T)

LUResult consist lu factorization.

PcaResult
struct PcaResult(T)

Principal component analises result.

QRResult
struct QRResult(T)
SvdResult
struct SvdResult(T)
choleskyResult
struct choleskyResult(T)
Undocumented in source.

Templates

CommonType
template CommonType(A)
Undocumented in source.
CommonType
template CommonType(A, B)
Undocumented in source.

Meta

Authors

Ilya Yaroshenko, Lars Tandle Kyllingstad (SciD author)