Fac_LU

scalation.mathstat.Fac_LU
See theFac_LU companion class
object Fac_LU

The Fac_LU companion object provides functions related to LU Factorization.

Attributes

Companion
class
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
Fac_LU.type

Members list

Value members

Concrete methods

def conditionNum(a: MatrixD, a_lu: Fac_LU): Double

Compute the condition number of matrix a, which equals ||a|| ||b|| where b = a.inverse Requires a to be a square matrix. For rectangular matrices, @see Fac_SVD.

Compute the condition number of matrix a, which equals ||a|| ||b|| where b = a.inverse Requires a to be a square matrix. For rectangular matrices, @see Fac_SVD.

Value parameters

a

the matrix whose condition number is sought

a_lu

LU Factorization of matrix A

Attributes

def conditionNum2(a: MatrixD, a_lu: Fac_LU): Double

Compute the condition number of matrix 'a', which equals ||a|| ||b|| where b = a.inverse Requires 'a' to be a square matrix. For rectangular matrices, @see Fac_SVD.

Compute the condition number of matrix 'a', which equals ||a|| ||b|| where b = a.inverse Requires 'a' to be a square matrix. For rectangular matrices, @see Fac_SVD.

Value parameters

a

the matrix whose condition number is sought

a_lu

LU Factorization of matrix A

Attributes

def det(a: MatrixD)(lu: Fac_LU): Double

Compute the determinant of matrix a. The value of the determinant indicates, among other things, whether there is a unique solution to a system of linear equations (a nonzero determinant).

Compute the determinant of matrix a. The value of the determinant indicates, among other things, whether there is a unique solution to a system of linear equations (a nonzero determinant).

Value parameters

a

the matrix whose determinant is sought

lu

an LU factorization (use existing or make a new one)

Attributes

def diagnoseMat(a: MatrixD): Unit

Diagnose matrix a looking for high correlation, high condition number, lower than expected rank, zero variance columns (there should only be one).

Diagnose matrix a looking for high correlation, high condition number, lower than expected rank, zero variance columns (there should only be one).

Value parameters

a

the matrix to diagnose

Attributes

def inverse(a: MatrixD)(lu: Fac_LU): MatrixD

Return the inverse of matrix a by calling the inverse method in Fac_LU. Note: Fac_LU.inverse is generally faster and more robust than Fac_Inv.inverse.

Return the inverse of matrix a by calling the inverse method in Fac_LU. Note: Fac_LU.inverse is generally faster and more robust than Fac_Inv.inverse.

Value parameters

a

the matrix whose inverse is sought

lu

an LU factorization (use existing or make a new one)

Attributes

def norm1est(a: MatrixD, a_lu: Fac_LU, inv: Boolean): Double

Compute an estimate of the L1 norm of this matrix, i.e., maximum absolute column sum. It uses an adapted version of Hager's algorithm.

Compute an estimate of the L1 norm of this matrix, i.e., maximum absolute column sum. It uses an adapted version of Hager's algorithm.

Value parameters

a

the matrix A whose norm is sought

a_lu

LU Factorization of matrix A

inv

whether or not to compute for inverse (default true)

Attributes

See also

Algorithm 4.1 in HIGHAM1998

Higham, N.J. "Fortran Codes for Estimating the One-Norm of a Real or Complex Matrix, with Applications to Condition Estimation." ACM Trans. Math. Soft., 14, 1988, pp. 381-396.

def norm1est(a: MatrixD, inv: Boolean): Double

Compute an estimate of the L1 norm of 'this' matrix, i.e., maximum absolute column sum. It uses an adapted version of Hager's algorithm.

Compute an estimate of the L1 norm of 'this' matrix, i.e., maximum absolute column sum. It uses an adapted version of Hager's algorithm.

Value parameters

a

the matrix A whose norm is sought

inv

whether or not to compute for inverse (default true)

Attributes

def solve(a: MatrixD, lu: Fac_LU, b: VectorD): VectorD

Solve a system of linear equations a*x = b.

Solve a system of linear equations a*x = b.

Value parameters

a

the matrix A holding the coefficients of the equations

b

the constant vector

lu

LU Factorization of matrix A

Attributes

Solve for x in the equation a*x = b in an over determined system of linear equation using least squares. Return the solution vector x.

Solve for x in the equation a*x = b in an over determined system of linear equation using least squares. Return the solution vector x.

Value parameters

a

the matrix A holding the coefficients of the equations

b

the constant vector

Attributes

See also

people.csail.mit.edu/bkph/articles/Pseudo_Inverse.pdf

Solve for x in the equation a*x = b in an under determined system of linear equation by finding the smallest solution. Return the solution vector x.

Solve for x in the equation a*x = b in an under determined system of linear equation by finding the smallest solution. Return the solution vector x.

Value parameters

a

the matrix A holding the coefficients of the equations

b

the constant vector

Attributes

See also

people.csail.mit.edu/bkph/articles/Pseudo_Inverse.pdf

def solve_(a: MatrixD, b: VectorD): VectorD

Solve for x in the equation a*x = b using LU Factorization. Return the solution vector x.

Solve for x in the equation a*x = b using LU Factorization. Return the solution vector x.

Value parameters

a

the matrix A holding the coefficients of the equations

b

the constant vector

Attributes

def test(a: MatrixD, b: VectorD): Unit

Test the LU Factorization of matrix a into l and u and its usage in solving a system of linear equations.

Test the LU Factorization of matrix a into l and u and its usage in solving a system of linear equations.

Value parameters

a

the matrix A to be factored

b

the constant vector in Ax = b

Attributes