Skip to content
Snippets Groups Projects
Commit af0e454c authored by Kutalmış Berçin's avatar Kutalmış Berçin
Browse files

BUG: fix QRMatrix (#1261, #1240)

    QRMatrix (i.e. QR decomposition, QR factorisation or orthogonal-triangular
    decomposition) decomposes a scalar/complex matrix \c A into the following
    matrix product:

    \verbatim
        A = Q*R,
    \endverbatim

    where
     \c Q is a unitary similarity matrix,
     \c R is an upper triangular matrix.

Usage
    Input types:
     - \c A can be a \c SquareMatrix<Type> or \c RectangularMatrix<Type>

    Output types:
     - \c Q is always of the type of the matrix \c A
     - \c R is always of the type of the matrix \c A

    Options for the output forms of \c QRMatrix (for an (m-by-n) input matrix
    \c A with k = min(m, n)):
     - outputTypes::FULL_R:     computes only \c R                   (m-by-n)
     - outputTypes::FULL_QR:    computes both \c R and \c Q          (m-by-m)
     - outputTypes::REDUCED_R:  computes only reduced \c R           (k-by-n)

    Options where to store \c R:
     - storeMethods::IN_PLACE:        replaces input matrix content with \c R
     - storeMethods::OUT_OF_PLACE:    creates new object of \c R

    Options for the computation of column pivoting:
     - colPivoting::FALSE:            switches off column pivoting
     - colPivoting::TRUE:             switches on column pivoting

    Direct solution of linear systems A x = b is possible by solve() alongside
    the following limitations:
     - \c A         = a scalar square matrix
     - output type  = outputTypes::FULL_QR
     - store method = storeMethods::IN_PLACE

Notes
    - QR decomposition is not unique if \c R is not positive diagonal \c R.
    - The option combination:
      - outputTypes::REDUCED_R
      - storeMethods::IN_PLACE
      will not modify the rows of input matrix \c A after its nth row.
    - Both FULL_R and REDUCED_R QR decompositions execute the same number of
      operations. Yet REDUCED_R QR decomposition returns only the first n rows
      of \c R if m > n for an input m-by-n matrix \c A.
    - For m <= n, FULL_R and REDUCED_R will produce the same matrices
parent 3afc3527
Branches
Tags
1 merge request!305ENH|BUG: Misc
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment