Fac_QR

scalation.mathstat.Fac_QR
See theFac_QR companion object
class Fac_QR(aa: MatrixD, needQ: Boolean) extends Factorization

The Fac_QR class provides methods to factor an m-by-n matrix a into the product of two matrices: q - an m-by-n orthogonal matrix and r - an n-by-n right upper triangular matrix such that a = q * r. It uses uses Householder orthogonalization.

Value parameters

aa

the matrix to be factor into q and r

needQ

flag indicating whether a full q matrix is needed

Attributes

See also
Companion
object
Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
class Fac_QR_RR

Members list

Value members

Concrete methods

def computeQ(): Unit

Compute the full q orthogonal matrix based on updated values in at.

Compute the full q orthogonal matrix based on updated values in at.

Attributes

def factor(): Fac_QR

Perform QR Factorization and store the result in a single matrix which contains Householder vectors of each column in the lower triangle of the aa matrix. This algorithm uses Householder orthogonalization.

Perform QR Factorization and store the result in a single matrix which contains Householder vectors of each column in the lower triangle of the aa matrix. This algorithm uses Householder orthogonalization.

Attributes

See also

5.1 and 5.2 in Matrix Computations

QRDecomposition.java in Jama

Return both the orthogonal q matrix and the right upper triangular r matrix.

Return both the orthogonal q matrix and the right upper triangular r matrix.

Attributes

Efficient calculation of inverse matrix a^-1 from existing factorization. a * a^-1 = I

Efficient calculation of inverse matrix a^-1 from existing factorization. a * a^-1 = I

Attributes

def nullspace(rank: Int): MatrixD

Compute the nullspace of matrix a: { x | ax = 0 } using QR Factorization qr*x = 0. Gives a basis of dimension n - rank for the nullspace Caveat: requires dim >= dim2

Compute the nullspace of matrix a: { x | ax = 0 } using QR Factorization qr*x = 0. Gives a basis of dimension n - rank for the nullspace Caveat: requires dim >= dim2

Value parameters

rank

the rank of the matrix (number of linearly independent column vectors)

Attributes

Compute the nullspace of matrix a: { x | ax = 0 } using QR Factorization qr*x = 0. Gives only one vector in the nullspace.

Compute the nullspace of matrix a: { x | ax = 0 } using QR Factorization qr*x = 0. Gives only one vector in the nullspace.

Value parameters

x

a vector with the correct dimension

Attributes

def solve(b: VectorD): VectorD

Solve for x in aax = b using the QR Factorization aa = qr via r*x = q.t * b without actually calculating the q matrix. Note /~ is the back substitution operator (\ in MatLab).

Solve for x in aax = b using the QR Factorization aa = qr via r*x = q.t * b without actually calculating the q matrix. Note /~ is the back substitution operator (\ in MatLab).

Value parameters

b

the constant vector

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