|
RcdMathLib_doc
Open Source Library for Linear and Non-linear Algebra
|
Givens algorithm for the QR-decomposition. Provide necessary methods to construct Q- and R- matrices using Givens rotations. A = QR, where Q is an (m
n)-matrix with orthonormal columns and R is an (n
n) upper triangular matrix.
More...
Go to the source code of this file.
Functions | |
| int8_t | qr_givens_decomp (uint8_t m, uint8_t n, matrix_t A[][n], uint8_t q_col_num, matrix_t Q[][q_col_num], bool reduced) |
| Computes the QR decomposition of the matrix A by using the Givens algorithm. More... | |
| void | qr_givens_get_params (matrix_t xjj, matrix_t xij, matrix_t c_s_t_r_vec[]) |
| Compute the Givens parameters. More... | |
Givens algorithm for the QR-decomposition. Provide necessary methods to construct Q- and R- matrices using Givens rotations. A = QR, where Q is an (m
n)-matrix with orthonormal columns and R is an (n
n) upper triangular matrix.
Definition in file qr_givens.h.
| int8_t qr_givens_decomp | ( | uint8_t | m, |
| uint8_t | n, | ||
| matrix_t | A[][n], | ||
| uint8_t | q_col_num, | ||
| matrix_t | Q[][q_col_num], | ||
| bool | reduced | ||
| ) |
Computes the QR decomposition of the matrix A by using the Givens algorithm.
Gets a QR decomposition of an m-by-n matrix A such that A = Q*R. The compact as well as the full decomposition of the matrix can be computed.
| [in] | m | row number of the matrix. |
| [in] | n | column number of the matrix. |
| [in,out] | A[][] | pointer to the matrices A and R. |
| [in] | q_col_num | column number of the matrix Q. |
| [out] | Q[][] | pointer to the Q matrix. |
| [in] | reduced | computes the compact form of the QR decomposition if true, otherwise the full version. |
Definition at line 33 of file qr_givens.c.
References matrix_clear(), matrix_get_upp_triang(), matrix_part_copy(), matrix_t, and qr_givens_get_params().
Referenced by givens_test(), and solve_givens().
Compute the Givens parameters.
The computation of the parameters c, s, t, and r can have problems with overflow or underflow, therefore this algorithm employs a normalization procedure. The Givens parameters c, s, t and r are saved in a vector.
| [in] | xjj | value at the diagonal j of the matrix. |
| [in] | xij | value at the index j of a column vector i. |
| [out] | c_s_t_r_vec[] | pointer to the vector holding the c, s, t and r parameters. |
Definition at line 110 of file qr_givens.c.
References matrix_t.
Referenced by givens_test(), and qr_givens_decomp().