Functions and Formulas  

Linear Algebra  

Linear Algebra

choleskyGetL

Returns the lower triangular factor L of a Cholesky decomposition, such that L*L'=A.

Collection choleskyGetL(Collection A)

Parameters
A : Matrix to be decomposed, such that L*L'=A

choleskySolve

Returns the solution x of the problem Ax = b for x using Cholesky decomposition. x can be a matrix or vector.

Collection choleskySolve(Collection A, Collection b)

Parameters
A : Matrix A of problem Ax=b
b : Vector (or matrix) b of the problem Ax=b

condition

Returns the condition number of the matrix: max(S)/min(S).

float condition(Collection X)

Parameters
X : The matrix to be analyzed.

cov

Calculates the matrix product of the given matrices.

Collection cov(Collection m1, Collection m2)

Parameters
m1 : The first matrix
m2 : The second matrix

determinant

Returns the determinant of the matrix.

float determinant(Collection X)

Parameters
X : Matrix for which the determinant is sought.

eigenproblemGetD

Returns matrix D of A = V*D*V'.

Collection eigenproblemGetD(Collection X)

Parameters
X : The matrix

eigenvalues

Returns a vector listing the complex eigenvalues of the matrix or a single eigenvalue.

Collection eigenvalues(Collection X, boolean complex=false, int index=0.0, boolean ahp=false)

Parameters
X : The matrix to be tested.
complex : true: return complex part of the eigenvalues (optional)
index : Index (0 : all, 1 : greatest, 2...)
ahp : true: calculate each group separately

eigenvectors

Returns a matrix listing the eigenvectors of the given matrix.as columns (in dimension 1) and the values in dimension 0.

Collection eigenvectors(Collection X, int index=0.0, boolean ahp=false)

Parameters
X : The matrix
index : Index (0 : all, 1 : greatest, 2...)
ahp : true: calculate each group separately

inverse

Returns the inverse of the matrix. The matrix must be invertible, otherwise the result is undefined.

Collection inverse(Collection X)

Parameters
X : The matrix for which the Inverse is sought.

isFullRank

Returns true if the matrix is of full rank

boolean isFullRank(Collection X)

Parameters
X : The Matrix to be tested.

isNonsingular

Returns true if the matrix is nonsingular

boolean isNonsingular(Collection X)

Parameters
X : The Matrix to be tested.

isSPD

Returns true if the matrix is symmetric positive definite.

boolean isSPD(Collection X)

Parameters
X : The matrix to be analyzed

luGetL

Returns matrix L of the LU decomposition of the given matrix.

Collection luGetL(Collection X)

Parameters
X : The matrix.

luGetPivot

Returns the Pivot vector of the LU decomposition of the given matrix.

Collection luGetPivot(Collection X)

Parameters
X : TheMatrix.

luGetU

Returns matrix U of the LU decomposition of the given matrix.

Collection luGetU(Collection X)

Parameters
X : The matrix.

luSolve

Returns solution x of the problem Ax = b for x using LU decomposition.

Collection luSolve(Collection A, Collection b)

Parameters
A : Matrix A of the problem Ax = b. A can be an m-by-n matrix with m<>n.
b : Vector (or matrix) b of the problem Ax = b.

matrixProduct

Calculates the matrix product of the given matrices.

Collection matrixProduct(Collection m1, Collection m2)

Parameters
m1 : The first matrix
m2 : The second matrix

norm2

Returns the 2 norm (max(S)) of the matrix

float norm2(Collection X)

Parameters
X : The matrix to be analyzed.

nsum

Adds all negative numbers in a container.

Object nsum(Collection x)

Parameters
x : is the container to sum up.

prod

Multiplies all the numbers in the given container and returns the product.

Object prod(Collection x)

Parameters
x : is the container for which you want the product.

pseudoInverse

Returns the More-Penrose pseudoinverse of the matrix.

Collection pseudoInverse(Collection X)

Parameters
X : The matrix for which the Inverse is sought.

psum

Adds all positive numbers in a container.

Object psum(Collection x)

Parameters
x : is the container to sum up.

qrGetHouseholder

Returns the Householder vectors from the QR decomposition of the given matrix.

Collection qrGetHouseholder(Collection X)

Parameters
X : The matrix.

qrGetQ

Returns matrix Q of the QR decomposition of the given matrix.

Collection qrGetQ(Collection X)

Parameters
X : The matrix.

qrGetR

Returns matrix R of the QR decomposition of the given matrix.

Collection qrGetR(Collection X)

Parameters
X : The matrix.

qrSolve

Returns solution x of the problem Ax = b for x using QR decomposition.

Collection qrSolve(Collection A, Collection b)

Parameters
A : Matrix A of the problem Ax = b.
b : Vector (or matrix) b of the problem Ax = b.

rank

Returns the rank of the matrix.

int rank(Collection X)

Parameters
X : Returns the rank of the matrix.

sum

Adds all the numbers in a container.

Object sum(Collection x, Collection x-1)

Parameters
x : is the container to sum up
x-1 : is the container to sum up

svdGetS

Returns matrix S of the SVD decomposition of the given matrix.

Collection svdGetS(Collection X)

Parameters
X : The matrix.

svdGetSV

Returns a vector of singular values. Values are ordered from large to small.

Collection svdGetSV(Collection X)

Parameters
X : The matrix.

svdGetU

Returns matrix U of the SVD decomposition of the given matrix.

Collection svdGetU(Collection X)

Parameters
X : The matrix.

svdGetV

Returns matrix V of the SVD decomposition of the given matrix.

Collection svdGetV(Collection X)

Parameters
X : The matrix.

svdSolve

Solves the problem Ax = b for x using singular value decomposition

Collection svdSolve(Collection A, Collection b)

Parameters
A : The matrix A of problem Ax=b.
b : Vector (or matrix) b of the problem Ax = b.

transposed

Returns the transposed of the given auto matrix.

Collection transposed(Collection matrix)

Parameters
matrix : The auto matrix for which you want to get the transposed matrix.

Feedback

Did you find what you needed?

If you have any further questions or suggestions to improve this page, please let us know:

=