Class QRDecomposition

java.lang.Object
com.apple.foundationdb.linear.QRDecomposition

public class QRDecomposition extends Object
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.

  • Method Details

    • decomposeMatrix

      @Nonnull public static QRDecomposition.Result decomposeMatrix(@Nonnull RealMatrix matrix)
      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.Result object, 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.Result object containing suppliers for the Q and R matrices.
      Throws:
      IllegalArgumentException - if the provided matrix is not square.