java.lang.Object
org.ujmp.core.doublematrix.calculation.general.decomposition.QR.QRMatrix
Enclosing interface:
QR<T>

public static class QR.QRMatrix extends Object
  • Field Details

    • serialVersionUID

      public static final long serialVersionUID
      See Also:
    • QR

      private final double[][] QR
      Array for internal storage of decomposition.
    • m

      private final int m
      Row and column dimensions.
    • n

      private final int n
      Row and column dimensions.
    • Rdiag

      private final double[] Rdiag
      Array for internal storage of diagonal of R.
  • Constructor Details

    • QRMatrix

      public QRMatrix(Matrix A)
      QR Decomposition, computed by Householder reflections.
      Parameters:
      A - Rectangular matrix
  • Method Details

    • isFullRank

      public final boolean isFullRank()
      Is the matrix full rank?
      Returns:
      true if R, and hence A, has full rank.
    • getH

      public final DenseDoubleMatrix2D getH()
      Return the Householder vectors
      Returns:
      Lower trapezoidal matrix whose columns define the reflections
    • getR

      public final DenseDoubleMatrix2D getR()
      Return the upper triangular factor
      Returns:
      R
    • getQ

      public final DenseDoubleMatrix2D getQ()
      Generate and return the (economy-sized) orthogonal factor
      Returns:
      Q
    • solve

      public final Matrix solve(Matrix B)
      Least squares solution of A*X = B
      Parameters:
      B - A Matrix with as many rows as A and any number of columns.
      Returns:
      X that minimizes the two norm of Q*R*X-B.
      Throws:
      IllegalArgumentException - Matrix row dimensions must agree.
      RuntimeException - Matrix is rank deficient.