naginterfaces.library.matop.real_gen_rq¶
- naginterfaces.library.matop.real_gen_rq(m, a)[source]¶
real_gen_rq
finds the factorization of the real () matrix , so that is reduced to upper triangular form by means of orthogonal transformations from the right.For full information please refer to the NAG Library document for f01qj
https://support.nag.com/numeric/nl/nagdoc_30.3/flhtml/f01/f01qjf.html
- Parameters
- mint
, the number of rows of the matrix .
When then an immediate return is effected.
- afloat, array-like, shape
The leading part of the array must contain the matrix to be factorized.
- Returns
- afloat, ndarray, shape
The upper triangular part of will contain the upper triangular matrix , and the strictly lower triangular part of and the rectangular part of to the right of the upper triangular part will contain details of the factorization as described in Notes.
- zetafloat, ndarray, shape
contains the scalar for the th transformation. If then , otherwise contains as described in Notes and is always in the range .
- Raises
- NagValueError
- (errno )
On entry, and .
Constraint: .
- (errno )
On entry, .
Constraint: .
- Notes
No equivalent traditional C interface for this routine exists in the NAG Library.
The matrix is factorized as
where is an orthogonal matrix and is an upper triangular matrix.
is given as a sequence of Householder transformation matrices
the ()th transformation matrix, , being used to introduce zeros into the th row of . has the form
where
is a scalar, is an element vector and is an element vector. is chosen to annihilate the elements in the th row of .
The vector is returned in the th element of and in the th row of , such that is in , the elements of are in and the elements of are in . The elements of are returned in the upper triangular part of .
- References
Golub, G H and Van Loan, C F, 1996, Matrix Computations, (3rd Edition), Johns Hopkins University Press, Baltimore
Wilkinson, J H, 1965, The Algebraic Eigenvalue Problem, Oxford University Press, Oxford