﻿ILMath.qr Method (InArray(fcomplex), OutArray(fcomplex), OutArray(Int32), Boolean)

ILNumerics Ultimate VS Documentation
ILNumerics - Technical Application Development
QR decomposition with pivoting, potentially size saving shapes.

[ILNumerics Computing Engine]

Namespace:  ILNumerics
Assembly:  ILNumerics.Computing (in ILNumerics.Computing.dll) Version: 5.5.0.0 (5.5.7503.3146)
Syntax

```public static RetArray<fcomplex> qr(
InArray<fcomplex> A,
OutArray<fcomplex> R = null,
OutArray<int> E = null,
bool economySize = false
)```

#### Parameters

A
Type: ILNumericsInArrayfcomplex
Input matrix. Size [m x n].
R (Optional)
Type: ILNumericsOutArrayfcomplex
[Output, optional] Upper triangular matrix. Size [m x n] or [min(m,n) x n] depending on economySize (see remarks). Default: (null) do not compute R.
E (Optional)
Type: ILNumericsOutArrayInt32
[Output, optional] Permutation matrix from pivoting. Size [m x m]. Default: (null) do not return.E.
economySize (Optional)
Type: SystemBoolean
[Optional] True: return more efficient structures if possible. See remarks for details. Default: false.

#### Return Value

Type: RetArrayfcomplex
Orthonormal / unitary matrix Q as result of decomposing A. Size [m x m] or [m x min(m,n)], depending on economySize (see remarks).
Remarks

This function performs the QR decomposition on matrix A. It computes matrices Q, R and E, with Q ** R = A ** E, where '**' denotes matrix multiplication.

If R is null on entry, the function returns the compact QR decomposition result from qr(InArrayfcomplex).

If economySize is false, the function returns Q, R and E such that the equation

`A * E = Q * R`
holds within roundoff errors.

If economySize is true ...

• and m >= n the size of Q and R will be [m x min(m,n)] and [min(m,n) x n] respectively. For m < n the sizes are not changed and as specified above.
• the output parameter E is returned as vector [n] with permutation indices rather than as a permutation matrix [n,n]. In this case the equation
`A[":",E] == Q * R`
holds, except roundoff errors.

E reflects the pivoting of A done inside the LAPACK function performing the decomposition so that R shows increasing diagonal element values. If E is not requested (null) the equation Q ** R = A holds instead.

[ILNumerics Computing Engine]