Fac_LU

scalation.mathstat.Fac_LU
See theFac_LU companion object
class Fac_LU(a: MatrixD) extends Factorization

The Fac_LU class provides methods to factor an m-by-n matrix into its lower and upper triangular products: A = LU when partial pivoting is not needed PA = LU where P is the permutation matrix A = QLU where Q = P.inverse where a is the given matrix, l is an m-by-n lower triangular matrix, and u is an n-by-n upper triangular matrix. The permutation matrix is represented by the piv vector. Once factored, can be used to solve a system of linear equations. Solve for x in Ax = b: Ax = QLUx = b => LUx = Pb using steps (1) and (2) (1) Solve Ly = Pb using forward substitution for y (2) Solve Ux = y using backward substitution for x

Value parameters

a

the given m-by-n rectangular matrix

Attributes

Companion
object
Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Value members

Concrete methods

Solve for x using back substitution in the equation u*x = y where matrix u is upper triangular.

Solve for x using back substitution in the equation u*x = y where matrix u is upper triangular.

Value parameters

y

the constant vector FIX - replace with /~

Attributes

def det: 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).

Attributes

def factor(): Fac_LU

Factor matrix a into the product of l and u.

Factor matrix a into the product of l and u.

Attributes

Return the lower l and upper u matrices.

Return the lower l and upper u matrices.

Attributes

Compute the inverse of matrix a from the LU Factorization.

Compute the inverse of matrix a from the LU Factorization.

Attributes

Permute matrix c, equivalent to qc, i.e., multiplying by the inverse of the permutation matrix p.

Permute matrix c, equivalent to qc, i.e., multiplying by the inverse of the permutation matrix p.

Value parameters

c

the matrix to permute

Attributes

Permute vector d, equivalent to pd, i.e., multiplying by the permutation matrix p.

Permute vector d, equivalent to pd, i.e., multiplying by the permutation matrix p.

Value parameters

d

the vector to permute

Attributes

def rank: Int

Return the rank (number of independent columns) of 'm-by-n' matrix 'a', by counting the number of non-zero diagonal elements in 'u'. If 'rank < n', then 'a' is singular.

Return the rank (number of independent columns) of 'm-by-n' matrix 'a', by counting the number of non-zero diagonal elements in 'u'. If 'rank < n', then 'a' is singular.

Attributes

See also

en.wikipedia.org/wiki/Rank_%28linear_algebra%29

Fac_QR_RR or SVD

def solve(b: VectorD): VectorD

Solve for x in the equation lux = b via ly = b and ux = y. Return the solution vector x.

Solve for x in the equation lux = b via ly = b and ux = y. Return the solution vector x.

Value parameters

b

the constant vector

Attributes

def split(): Unit

Split l into lower and upper triangular matrices by placing the upper portion in u and clearing, so l is properly lower triangular.

Split l into lower and upper triangular matrices by placing the upper portion in u and clearing, so l is properly lower triangular.

Attributes

Inherited methods

def factor1(): MatrixD

Factor a matrix into the product of two matrices, e.g., 'a = l * l.t', returning only the first matrix.

Factor a matrix into the product of two matrices, e.g., 'a = l * l.t', returning only the first matrix.

Attributes

Inherited from:
Factorization

Factor a matrix into the product of two matrices, e.g., 'a = l * l.t' or a = q * r, returning both the first and second matrices.

Factor a matrix into the product of two matrices, e.g., 'a = l * l.t' or a = q * r, returning both the first and second matrices.

Attributes

Inherited from:
Factorization
def factor2(): MatrixD

Factor a matrix into the product of two matrices, e.g., 'a = l * l.t', returning only the second matrix.

Factor a matrix into the product of two matrices, e.g., 'a = l * l.t', returning only the second matrix.

Attributes

Inherited from:
Factorization
inline def isFactored: Boolean

Return whether the matrix has been factored has aleady been factored.

Return whether the matrix has been factored has aleady been factored.

Attributes

Inherited from:
Factorization
def reset(): Unit

Reset by setting factored to false.

Reset by setting factored to false.

Attributes

Inherited from:
Factorization

Inherited fields

protected var factored: Boolean

Flag indicating whether the matrix has been factored

Flag indicating whether the matrix has been factored

Attributes

Inherited from:
Factorization