Package com.apple.foundationdb.linear
Class QRDecomposition
java.lang.Object
com.apple.foundationdb.linear.QRDecomposition
Provides a static method to compute the QR decomposition of a matrix.
This class is a utility class and cannot be instantiated. The decomposition
is performed using the Householder reflection method. The result of the
decomposition of a matrix A is an orthogonal matrix Q and an upper-triangular
matrix R such that A = QR.
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic QRDecomposition.ResultdecomposeMatrix(RealMatrix matrix) Decomposes a square matrix A into an orthogonal matrix Q and an upper triangular matrix R, such that A = QR.
-
Method Details
-
decomposeMatrix
Decomposes a square matrix A into an orthogonal matrix Q and an upper triangular matrix R, such that A = QR.This implementation uses the Householder reflection method to perform the decomposition. The resulting Q and R matrices are not computed immediately but are available through suppliers within the returned
QRDecomposition.Resultobject, allowing for lazy evaluation. The decomposition is performed on the transpose of the input matrix for efficiency.- Parameters:
matrix- the square matrix to decompose. Must not be null.- Returns:
- a
QRDecomposition.Resultobject containing suppliers for the Q and R matrices. - Throws:
IllegalArgumentException- if the providedmatrixis not square.
-