Given an array of types derived from abstract_vector
, it computes the
in-place QR factorization of , i.e.
where is an orthonormal arrays of vectors such that and is upper triangular. Note that it can also perform the QR factorization with column pivoting
where is a permutation matrix ensuring that the diagonal entries of have non-increasing absolute values. This amounts to using the pivoting QR as a rank-revealing factorization.
References
call qr(Q [, R] [, perm], info [, tol])
Q
: Array of types derived from one of the base types provided in the
AbstractVectors
module. On entry, it contains the original array.
On exit, it is overwritten by the orthogonal basis for its span.
It is an intent(inout)
argument.
R
: real
or complex
rank-2 array. On exit, its contains the upper triangular
matrix resulting from the QR factorization. It is an intent(out)
argument.
perm
(optional): Rank-1 array of integer
corresponding to the indices of
permuted columns. If perm
is absent, the naive QR factorization
is being computed.
info
: integer
information flag.
tol
(optional): Numerical tolerance to determine whether two vectors are colinear
or not. Default tol = atol_sp
or tol = atol_dp
.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(abstract_vector_rsp), | intent(inout) | :: | Q(:) |
Array of |
||
real(kind=sp), | intent(out) | :: | R(:,:) |
Upper triangular matrix resulting from the QR factorization. |
||
integer, | intent(out) | :: | info |
Information flag. |
||
real(kind=sp), | intent(in), | optional | :: | tol |
Tolerance to determine colinearity. |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(abstract_vector_rsp), | intent(inout) | :: | Q(:) |
Array of |
||
real(kind=sp), | intent(out) | :: | R(:,:) |
Upper triangular matrix resulting from the QR factorization. |
||
integer, | intent(out) | :: | perm(size(Q)) |
Permutation matrix. |
||
integer, | intent(out) | :: | info |
Information flag. |
||
real(kind=sp), | intent(in), | optional | :: | tol |
Tolerance to detect colinearity. |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(abstract_vector_rdp), | intent(inout) | :: | Q(:) |
Array of |
||
real(kind=dp), | intent(out) | :: | R(:,:) |
Upper triangular matrix resulting from the QR factorization. |
||
integer, | intent(out) | :: | info |
Information flag. |
||
real(kind=dp), | intent(in), | optional | :: | tol |
Tolerance to determine colinearity. |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(abstract_vector_rdp), | intent(inout) | :: | Q(:) |
Array of |
||
real(kind=dp), | intent(out) | :: | R(:,:) |
Upper triangular matrix resulting from the QR factorization. |
||
integer, | intent(out) | :: | perm(size(Q)) |
Permutation matrix. |
||
integer, | intent(out) | :: | info |
Information flag. |
||
real(kind=dp), | intent(in), | optional | :: | tol |
Tolerance to detect colinearity. |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(abstract_vector_csp), | intent(inout) | :: | Q(:) |
Array of |
||
complex(kind=sp), | intent(out) | :: | R(:,:) |
Upper triangular matrix resulting from the QR factorization. |
||
integer, | intent(out) | :: | info |
Information flag. |
||
real(kind=sp), | intent(in), | optional | :: | tol |
Tolerance to determine colinearity. |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(abstract_vector_csp), | intent(inout) | :: | Q(:) |
Array of |
||
complex(kind=sp), | intent(out) | :: | R(:,:) |
Upper triangular matrix resulting from the QR factorization. |
||
integer, | intent(out) | :: | perm(size(Q)) |
Permutation matrix. |
||
integer, | intent(out) | :: | info |
Information flag. |
||
real(kind=sp), | intent(in), | optional | :: | tol |
Tolerance to detect colinearity. |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(abstract_vector_cdp), | intent(inout) | :: | Q(:) |
Array of |
||
complex(kind=dp), | intent(out) | :: | R(:,:) |
Upper triangular matrix resulting from the QR factorization. |
||
integer, | intent(out) | :: | info |
Information flag. |
||
real(kind=dp), | intent(in), | optional | :: | tol |
Tolerance to determine colinearity. |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(abstract_vector_cdp), | intent(inout) | :: | Q(:) |
Array of |
||
complex(kind=dp), | intent(out) | :: | R(:,:) |
Upper triangular matrix resulting from the QR factorization. |
||
integer, | intent(out) | :: | perm(size(Q)) |
Permutation matrix. |
||
integer, | intent(out) | :: | info |
Information flag. |
||
real(kind=dp), | intent(in), | optional | :: | tol |
Tolerance to detect colinearity. |