- All Superinterfaces:
- All Known Subinterfaces:
- All Known Implementing Classes:
public interface QRDecomposition<T extends Matrix> extends DecompositionInterface<T>
QR decompositions decompose a rectangular matrix 'A' such that 'A=QR'. Where A ∈ ℜ n × m , n ≥ m, Q ∈ ℜ n × n is an orthogonal matrix, and R ∈ ℜ n × m is an upper triangular matrix. Some implementations of QR decomposition require that A has full rank.Some features of QR decompositions:
- Can decompose rectangular matrices.
- Numerically stable solutions to least-squares problem, but not as stable as SVD
- Can incrementally add and remove columns from the decomposed matrix. See
Returns the Q matrix from the decomposition. Should only be called after
DecompositionInterface.decompose(org.ejml.data.Matrix)has been called.
Q- (Input) Storage for Q. Reshaped to correct size automatically. If null a new matrix is created.
compact- If true an m by n matrix is created, otherwise n by n.
- The Q matrix.
Returns the R matrix from the decomposition. Should only be called after
If setZeros is true then an n × m matrix is required and all the elements are set. If setZeros is false then the matrix must be at least m × m and only the upper triangular elements are set.
R- (Input) Storage for R. Reshaped to correct size automatically. If null a new matrix is created.
compact- If true only the upper triangular elements are set
- The R matrix.