Class QRDecompositionCommonsResult

    • Constructor Detail

      • QRDecompositionCommonsResult

        public QRDecompositionCommonsResult​(org.apache.commons.math3.linear.QRDecomposition qr)
        Creates an instance.
        Parameters:
        qr - The result of the QR decomposition, not null
    • Method Detail

      • getQ

        public DoubleMatrix getQ()
        Returns the matrix $\mathbf{Q}$ of the decomposition.

        $\mathbf{Q}$ is an orthogonal matrix.

        Specified by:
        getQ in interface QRDecompositionResult
        Returns:
        the $\mathbf{Q}$ matrix
      • getQT

        public DoubleMatrix getQT()
        Returns the transpose of the matrix $\mathbf{Q}$ of the decomposition.

        $\mathbf{Q}$ is an orthogonal matrix.

        Specified by:
        getQT in interface QRDecompositionResult
        Returns:
        the $\mathbf{Q}$ matrix
      • getR

        public DoubleMatrix getR()
        Returns the matrix $\mathbf{R}$ of the decomposition.

        $\mathbf{R}$ is an upper-triangular matrix.

        Specified by:
        getR in interface QRDecompositionResult
        Returns:
        the $\mathbf{R}$ matrix
      • solve

        public DoubleArray solve​(DoubleArray b)
        Solves $\mathbf{A}x = b$ where $\mathbf{A}$ is a (decomposed) matrix and $b$ is a vector.
        Specified by:
        solve in interface DecompositionResult
        Parameters:
        b - the vector to calculate with
        Returns:
        the vector x
      • solve

        public double[] solve​(double[] b)
        Solves $\mathbf{A}x = b$ where $\mathbf{A}$ is a (decomposed) matrix and $b$ is a vector.
        Specified by:
        solve in interface DecompositionResult
        Parameters:
        b - the vector to calculate with
        Returns:
        the vector x
      • solve

        public DoubleMatrix solve​(DoubleMatrix b)
        Solves $\mathbf{A}x = \mathbf{B}$ where $\mathbf{A}$ is a (decomposed) matrix and $\mathbf{B}$ is a matrix.
        Specified by:
        solve in interface DecompositionResult
        Parameters:
        b - the matrix to calculate with
        Returns:
        the matrix x