RcdMathLib_doc
Open Source Library for Linear and Non-linear Algebra
qr_common.c File Reference

Common definitions and implementations for the QR-decomposition. Provide necessary methods to construct Q- and R- matrices using. More...

#include <inttypes.h>
#include <stdio.h>
#include <string.h>
#include "matrix.h"

Go to the source code of this file.

Functions

void qr_common_backward_subst (uint8_t m, uint8_t n, matrix_t U[][n], matrix_t b[m], matrix_t x_sol[m])
 Implements the backward substitution algorithm. More...
 
void qr_common_get_reduced_QR (uint8_t m, uint8_t n, matrix_t Q[m][m], matrix_t R[m][n], matrix_t reduc_Q[m][n], matrix_t reduc_R[n][n])
 Compute the reduced form of the QR-decomposition algorithm. More...
 

Detailed Description

Common definitions and implementations for the QR-decomposition. Provide necessary methods to construct Q- and R- matrices using.

Author
Zakaria Kasmi zkasm.nosp@m.i@in.nosp@m.f.fu-.nosp@m.berl.nosp@m.in.de

Definition in file qr_common.c.

Function Documentation

◆ qr_common_backward_subst()

void qr_common_backward_subst ( uint8_t  m,
uint8_t  n,
matrix_t  U[][n],
matrix_t  b[m],
matrix_t  x_sol[m] 
)

Implements the backward substitution algorithm.

Parameters
[in]mrow number of the matrix.
[in]ncolumn number of the matrix.
[in]U[][]pointer to the matrix U.
[in]b[]pointer to the vector b.
[out]x_sol[]pointer to the solution of the substitution algorithm.

Definition at line 28 of file qr_common.c.

References matrix_t.

Referenced by solve_givens(), solve_householder(), and solve_lu_decomp().

◆ qr_common_get_reduced_QR()

void qr_common_get_reduced_QR ( uint8_t  m,
uint8_t  n,
matrix_t  Q[m][m],
matrix_t  R[m][n],
matrix_t  red_Q[m][n],
matrix_t  red_R[n][n] 
)

Compute the reduced form of the QR-decomposition algorithm.

Parameters
[in]mrow number of the matrix.
[in]ncolumn number of the matrix.
[in]Q[][]pointer to the matrix Q.
[in]R[][]pointer to the matrix R.
[out]red_Q[][]pointer to the reduced matrix Q.
[out]red_R[][]pointer to the reduced matrix R.

Definition at line 59 of file qr_common.c.

References matrix_part_copy().