|
RcdMathLib_doc
Open Source Library for Linear and Non-linear Algebra
|
Enables to solve systems of linear equations Ax = b for x. More...
#include <stdio.h>#include "solve.h"#include "matrix.h"#include "qr_givens.h"#include "qr_common.h"#include "lu_decomp.h"#include "qr_householder.h"#include "moore_penrose_pseudo_inverse.h"Go to the source code of this file.
Functions | |
| int8_t | solve (uint8_t m, uint8_t n, matrix_t A[][n], matrix_t b[m], matrix_t x_sol[n], enum ALGORITHM algo) |
Solve an (m n) linear system Ax = b by using the Moore–Penrose, Householder, or the Givens algorithm. More... | |
| int8_t | solve_householder (uint8_t m, uint8_t n, matrix_t A[][n], matrix_t b[m], matrix_t x_sol[n]) |
Solve an (m n) linear system Ax = b, using the Householder algorithm. More... | |
| int8_t | solve_givens (uint8_t m, uint8_t n, matrix_t A[][n], matrix_t b[m], matrix_t x_sol[n]) |
Solve an (m n) linear system Ax = b, using the Givens algorithm. More... | |
| int8_t | solve_lu_decomp (uint8_t m, uint8_t n, matrix_t A[][n], matrix_t b[m], matrix_t x_sol[n]) |
Solve an (m n) linear system Ax = b, using the Gaussian Elimination with pivoting algorithm. More... | |
Enables to solve systems of linear equations Ax = b for x.
The user can select various algorithm such as the Moore–Penrose inverse, the Givens or the Householder algorithm for the QR-decomposition to solve the systems of linear equations.
Definition in file solve.c.
| int8_t solve | ( | uint8_t | m, |
| uint8_t | n, | ||
| matrix_t | A[][n], | ||
| matrix_t | b[m], | ||
| matrix_t | x_sol[n], | ||
| enum ALGORITHM | algo | ||
| ) |
Solve an (m
n) linear system Ax = b by using the Moore–Penrose, Householder, or the Givens algorithm.
| [in] | m | row number of the matrix A. |
| [in] | n | column number of the matrix A. |
| [in] | A[][] | pointer to the matrix A. |
| [in] | b[] | pointer to the vector b. |
| [out] | x_sol[] | pointer to the solution vector. |
| [in] | algo | specifies the algorithm to use (e.g. the Householder method). |
Definition at line 35 of file solve.c.
References Gauss, Givens, Householder, matrix_mul_vec(), matrix_t, Moore_Penrose, moore_penrose_get_pinv(), solve_givens(), solve_householder(), and solve_lu_decomp().
Referenced by solve_big_matrix_test(), and solve_test().
Solve an (m
n) linear system Ax = b, using the Givens algorithm.
| [in] | m | row number of the matrix A. |
| [in] | n | column number of the matrix A. |
| [in] | A[][] | pointer to the matrix A. |
| [in] | b[] | pointer to the vector b. |
| [out] | x_sol[] | pointer to the solution vector. |
Definition at line 102 of file solve.c.
References matrix_t, matrix_trans_mul_vec(), qr_common_backward_subst(), and qr_givens_decomp().
Referenced by solve().
| int8_t solve_householder | ( | uint8_t | m, |
| uint8_t | n, | ||
| matrix_t | A[][n], | ||
| matrix_t | b[m], | ||
| matrix_t | x_sol[n] | ||
| ) |
Solve an (m
n) linear system Ax = b, using the Householder algorithm.
| [in] | m | row number of the matrix A. |
| [in] | n | column number of the matrix A. |
| [in] | A[][] | pointer to the matrix A. |
| [in] | b[] | pointer to the vector b. |
| [out] | x_sol[] | pointer to the solution vector. |
Definition at line 77 of file solve.c.
References matrix_t, matrix_trans_mul_vec(), qr_common_backward_subst(), and qr_householder_decomp().
Referenced by loc_levenberg_marquardt(), loc_levenberg_marquardt_correction(), opt_levenberg_marquardt(), opt_levenberg_marquardt_correction(), and solve().
Solve an (m
n) linear system Ax = b, using the Gaussian Elimination with pivoting algorithm.
| [in] | m | row number of the matrix A. |
| [in] | n | column number of the matrix A. |
| [in] | A[][] | pointer to the matrix A. |
| [in] | b[] | pointer to the vector b. |
| [out] | x_sol[] | pointer to the solution vector. |
Definition at line 124 of file solve.c.
References lu_decomp(), matrix_get_inv_low_triang(), matrix_mul(), matrix_mul_vec(), matrix_t, and qr_common_backward_subst().
Referenced by solve().