public class LinearSolverQrHouse_FDRM extends LinearSolverAbstract_FDRM
QR decomposition can be used to solve for systems. However, this is not as computationally efficient as LU decomposition and costs about 3n2 flops.
It solve for x by first multiplying b by the transpose of Q then solving for the result.
QRx=b
Rx=Q^T b
A, numCols, numRows
Constructor and Description |
---|
LinearSolverQrHouse_FDRM()
Creates a linear solver that uses QR decomposition.
|
Modifier and Type | Method and Description |
---|---|
org.ejml.interfaces.decomposition.QRDecomposition<org.ejml.data.FMatrixRMaj> |
getDecomposition() |
boolean |
modifiesA() |
boolean |
modifiesB() |
double |
quality() |
boolean |
setA(org.ejml.data.FMatrixRMaj A)
Performs QR decomposition on A
|
void |
setMaxSize(int maxRows) |
void |
solve(org.ejml.data.FMatrixRMaj B,
org.ejml.data.FMatrixRMaj X)
Solves for X using the QR decomposition.
|
_setA, getA, invert
public LinearSolverQrHouse_FDRM()
public void setMaxSize(int maxRows)
public boolean setA(org.ejml.data.FMatrixRMaj A)
A
- not modified.public double quality()
public void solve(org.ejml.data.FMatrixRMaj B, org.ejml.data.FMatrixRMaj X)
B
- A matrix that is n by m. Not modified.X
- An n by m matrix where the solution is writen to. Modified.public boolean modifiesA()
public boolean modifiesB()
public org.ejml.interfaces.decomposition.QRDecomposition<org.ejml.data.FMatrixRMaj> getDecomposition()