NAME
rq_decompose - Decompose a matrix M into the product of a right triangular matrix and an
SYNOPSIS
#include "n/n_qr.h"
Example compile flags (system dependent):
-DLINUX_X86_64 -DLINUX_X86_64_OPTERON -DGNU_COMPILER
-I/home/kobus/include
-L/home/kobus/misc/load/linux_x86_64_opteron -L/usr/lib/x86_64-linux-gnu
-lKJB -lfftw3 -lgsl -lgslcblas -ljpeg -lSVM -lstdc++ -lpthread -lSLATEC -lg2c -lacml -lacml_mv -lblas -lg2c -lncursesw
int rq_decompose
(
const Matrix *mp,
Matrix **R_mpp,
Matrix **Q_mpp
);
DESCRIPTION
orthogonal matrix.
RETURNS
NO_ERROR on success, and ERROR on failure, with an appropriate error
message being set.
NOTE
The result is obtained directly from the result of qr_decompose().
Let S be an antidiagonal matrix of all 1's, which
reverses the order of rows of columns of the matrix it multiplies (depending
on if it is left or right multiplied). The dimension of S is implied from
the dimension of the other multiplicand. Note that S * S = I and S = S'.
As we see below, the RQ decomposition of M can by computed from the QR
decomposition of M' * S:
| M'* S = Q * R QR decomposition
M' * S = Q * S * S * R since (S * S) = I
S * M = R' * S * S * Q' transpose both sides
M = S * R' * S * S * Q' algebra
M = (R_new) * (Q_new) since (S * R' * S) is upper triangular
NOTE
This routine requires that that the LAPACK library is available. If this
file was compiled without the presence of that library, then this routine
will return ERROR.
DISCLAIMER
This software is not adequatedly tested. It is recomended that
results are checked independantly where appropriate.
AUTHOR
Kyle Simek
DOCUMENTER
Kobus Barnard
SEE ALSO
qr_decompose
,
ql_decompose
,
lq_decompose