public class BlockQrHouseHolderSolver extends Object implements LinearSolver<BlockMatrix64F>
A solver for BlockMatrix64HouseholderQR. Systems are solved for using the standard
QR decomposition method, sketched below.
A = Q*R
A*x = b
Q*R*x = b
R*x = y = QTb
x = R-1y
Where A is the m by n matrix being decomposed. Q is an orthogonal matrix. R is upper triangular matrix.
| Modifier and Type | Field and Description |
|---|---|
protected BlockMatrix64HouseholderQR |
decomp |
protected BlockMatrix64F |
QR |
| Constructor and Description |
|---|
BlockQrHouseHolderSolver() |
| Modifier and Type | Method and Description |
|---|---|
void |
invert(BlockMatrix64F A_inv)
Invert by solving for against an identity matrix.
|
boolean |
modifiesA()
Returns true if the passed in matrix to
LinearSolver.setA(org.ejml.data.Matrix64F)
is modified. |
boolean |
modifiesB()
Returns true if the passed in 'B' matrix to
LinearSolver.solve(org.ejml.data.Matrix64F, org.ejml.data.Matrix64F)
is modified. |
double |
quality()
Computes the quality using diagonal elements the triangular R matrix in the QR decomposition.
|
boolean |
setA(BlockMatrix64F A)
Computes the QR decomposition of A and store the results in A.
|
void |
solve(BlockMatrix64F B,
BlockMatrix64F X)
Solves for X in the linear system, A*X=B.
|
protected BlockMatrix64HouseholderQR decomp
protected BlockMatrix64F QR
public boolean setA(BlockMatrix64F A)
setA in interface LinearSolver<BlockMatrix64F>A - The A matrix in the linear equation. Modified. Reference saved.public double quality()
quality in interface LinearSolver<BlockMatrix64F>public void solve(BlockMatrix64F B, BlockMatrix64F X)
LinearSolverSolves for X in the linear system, A*X=B.
In some implementations 'B' and 'X' can be the same instance of a variable. Call
LinearSolver.modifiesB() to determine if 'B' is modified.
solve in interface LinearSolver<BlockMatrix64F>B - A matrix ℜ m × p. Might be modified.X - A matrix ℜ n × p, where the solution is written to. Modified.public void invert(BlockMatrix64F A_inv)
invert in interface LinearSolver<BlockMatrix64F>A_inv - Where the inverted matrix saved. Modified.public boolean modifiesA()
LinearSolverLinearSolver.setA(org.ejml.data.Matrix64F)
is modified.modifiesA in interface LinearSolver<BlockMatrix64F>public boolean modifiesB()
LinearSolverLinearSolver.solve(org.ejml.data.Matrix64F, org.ejml.data.Matrix64F)
is modified.modifiesB in interface LinearSolver<BlockMatrix64F>Copyright © 2013. All Rights Reserved.