public class DecompositionQR
extends java.lang.Object
Constructor and Description |
---|
DecompositionQR(SimpleMatrix A)
Constructor performing the actual decomposition of a matrix
![]() |
Modifier and Type | Method and Description |
---|---|
SimpleMatrix |
getQ()
Compute Q from the internal storage QR.
|
SimpleMatrix |
getR()
Compute R from the internal storages QR and Rdiag.
|
boolean |
isFullRank()
Specifies whether the input Matrix
![]() |
SimpleMatrix |
solve(SimpleMatrix B)
Computes solution Matrix
![]() ![]() |
SimpleVector |
solve(SimpleVector b)
Computes solution Vector
![]() ![]() |
public DecompositionQR(SimpleMatrix A)
solve(SimpleVector b)
, solve(SimpleMatrix B)
,
getQ()
, and getR()
) can be used multiple times without having
to recompute the decomposition.A
- The Matrix to be decomposed.public boolean isFullRank()
public SimpleVector solve(SimpleVector b)
Remark: If you want to further improve the accuracy of your solution in case (1),
perform a correction step in the following manner:
x = qr.solve(b);
x += qr.solve(b - A*x);
b
- The right-hand-side Vector.solve(SimpleMatrix)
public SimpleMatrix solve(SimpleMatrix B)
solve(SimpleVector)
but for multiple
right-hand-side vectors, given as a Matrix.B
- The right-hand-side Matrix for which a solution is computed column-wise.solve(SimpleVector)
public SimpleMatrix getR()
public SimpleMatrix getQ()