Linear Algebra

CholeskyGetL

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

Collection CholeskyGetL(Collection 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)

condition

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

float condition(Collection X)

count

Returns the number of cells in a tensor

Object count(Collection x, Collection cmp=nothing)

countRange

Returns the number of values within a given range.

Object countRange(Collection x, Collection min, Collection max)

covarianceMatrix

Calculates the matrix product of the given matrices.

Collection covarianceMatrix(Collection m1, Collection m2)

determinant

Returns the determinant of the matrix.

float determinant(Collection X)

EigenproblemGetD

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

Collection EigenproblemGetD(Collection X)

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, boolean ahp=false)

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, boolean ahp=false)

inverse

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

Collection inverse(Collection X)

isFullRank

Returns true if the matrix is of full rank

boolean isFullRank(Collection X)

isNonsingular

Returns true if the matrix is nonsingular

boolean isNonsingular(Collection X)

isSPD

Returns true if the matrix is symmetric positive definite.

boolean isSPD(Collection X)

linearMapping

Performs a mapping from a source vector to another vector space using either the weighted sum method or the proportional score method.

Collection linearMapping(Collection matrix, Collection x, integer sign=all, Object total=0.0, integer grouphandling=nothing, integer method=nothing, integer causeslevel=nothing, integer effectslevel=nothing)

Result: The linearMapping function maps a score for one dimension of a matrix to a score on the other dimension of a matrix using either the weighted sum method or the proportional score method.

Calculation using weighted sum method:

  1. 1
    for each row in the matrix multiply all values by the corresponding value in the input vector
  2. 2
    calculate the sum of all columns in the matrix
  3. 3
    optionally normalize the sum to a given total, e.g. 1.0: sum up all values in the output vector, then divide each value of the output vector by this sum.

Calculation using proportional score method:

  1. 1
    calculate the sum of all columns in the matrix
  2. 2
    for each row in the matrix multiply all values by the corresponding value in the input vector
  3. 3
    divide all values in the matrix by the factor calculated in step 1.
  4. 4
    calculate the sum of all columns in the matrix
  5. 5
    optionally normalize the sum to a given total, e.g. 1.0: sum up all values in the output vector, then divide each value of the output vector by this sum.

LUGetL

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

Collection LUGetL(Collection X)

LUGetPivot

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

Collection LUGetPivot(Collection X)

LUGetU

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

Collection LUGetU(Collection X)

LUSolve

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

Collection LUSolve(Collection A, Collection b)

matrixProduct

Calculates the matrix product of the given matrices.

Collection matrixProduct(Collection m1, Collection m2)

norm

Normalizes the numbers in a container to a given total.

Collection norm(Collection x, Numeric total, integer level=nothing, Object sumdim=nothing, Collection , Numeric , integer =nothing, Object =nothing)

norm2

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

float norm2(Collection X)

nsum

Adds all negative numbers in a container.

Object nsum(Collection x)

percentage

Normalizes the numbers in a container to a total of 1.0.

Collection percentage(Collection x, integer level=0, Object sumdim=nothing)

prod

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

Object prod(Collection x)

pseudoInverse

Returns the More-Penrose pseudoinverse of the matrix.

Collection pseudoInverse(Collection X)

psum

Adds all positive numbers in a container.

Object psum(Collection x)

QRGetHouseholder

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

Collection QRGetHouseholder(Collection X)

QRGetQ

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

Collection QRGetQ(Collection X)

QRGetR

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

Collection QRGetR(Collection X)

QRSolve

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

Collection QRSolve(Collection A, Collection b)

rank

Returns the rank of the matrix.

int rank(Collection X)

sum

Adds all the numbers in a container.

Object sum(Collection x, Collection )

SVDGetS

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

Collection SVDGetS(Collection X)

SVDGetSV

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

Collection SVDGetSV(Collection X)

SVDGetU

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

Collection SVDGetU(Collection X)

SVDGetV

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

Collection SVDGetV(Collection X)

SVDSolve

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

Collection SVDSolve(Collection A, Collection b)

transposed

Returns the transposed of the given auto matrix.

Collection transposed(Collection matrix)

Feedback

Did you find what you needed?

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

=