|
TBCI Numerical high perf. C++ Library 2.8.0
|
#include "tbci/matrix.h"#include "tbci/vector.h"
Go to the source code of this file.
Macros | |
| #define | MLU_MINVAL 5e-16 |
| #define | MLU_RES_WARN 1e-11 |
Functions | |
| template<typename T> | |
| NAMESPACE_TBCI int | lu_decomp (Matrix< T > &mat) |
| LU decomposes the TBCI::Matrix mat. | |
| template<typename T> | |
| TVector< T > | LU_fwd_subst (const Matrix< T > &lu, const Vector< T > &y) |
| template<typename T> | |
| TVector< T > | LU_bkw_subst (const Matrix< T > &lu, const Vector< T > &y) |
| template<typename T> | |
| TVector< T > | LU_solve (const Matrix< T > &lu, const Vector< T > &b) |
| template<typename T> | |
| TVector< T > | lu_solve (Matrix< T > &mat, const Vector< T > &b) |
| template<typename T> | |
| TMatrix< T > | LU_solve (const Matrix< T > &lu, const Matrix< T > &b) |
| template<typename T> | |
| TMatrix< T > | lu_solve (Matrix< T > &mat, const Matrix< T > &b) |
| template<typename T> | |
| T | LU_det (const Matrix< T > &lu) |
| calculates determinant of an already LU decomposed Matrix | |
| template<typename T> | |
| T | lu_det (Matrix< T > &mat) |
| calculates determinant of a Matrix by LU decomposition | |
| template<typename T> | |
| TMatrix< T > | LU_invert (const Matrix< T > &mat) |
| Returns the inverse of a already LU decomposed Matrix. | |
| template<typename T> | |
| TMatrix< T > | lu_invert (Matrix< T > &mat) |
| Returns the inverse of a Matrix by performing a LU decomposition. | |
LU solver implementation (TBCI::lu_decomp)
LU decomposizes a TBCI::Matrix and solves the vector equation Ax = b
LU_xxxx operates on an already LU decomposed Matrix, whereas lu_xxxx does decompose it and then does * the requested action (eg. determinant calculation ...)
NOTE: the matrix passed as argument to lu_xxxx will be modified!
License: GNU LGPL
Definition in file lu_solver.h.
| #define MLU_MINVAL 5e-16 |
Definition at line 32 of file lu_solver.h.
Referenced by lu_decomp().
| #define MLU_RES_WARN 1e-11 |
Definition at line 37 of file lu_solver.h.
Referenced by lu_solve().
Definition at line 205 of file lu_solver.h.
References ALIGN2, BCHK, TMatrix< T >::get(), i, MIN_ALIGN2, REGISTER, TMatrix< T >::rows(), T, x, and y.
Referenced by LU_solve(), and LU_solve().
| NAMESPACE_TBCI int lu_decomp | ( | Matrix< T > & | mat | ) |
LU decomposes the TBCI::Matrix mat.
Decomposition is compactly stored in one Matrix The diagonal elements of the lower Matrix are all 1 (this is a feature of the algorithm).
Definition at line 94 of file lu_solver.h.
References ALIGN2, BCHK, TMatrix< T >::columns(), EL_PER_CL, err, fabs(), TMatrix< T >::get(), TMatrix< T >::getcref(), i, LIKELY, MATH__, MAX, MIN, MIN_ALIGN2, MLU_MINVAL, PREFETCH_R, REGISTER, TMatrix< T >::rows(), TMatrix< T >::setval(), T, and UNLIKELY.
Referenced by BdMatrix< T >::FGDT, lu_decomp(), lu_det(), lu_invert(), lu_solve(), and lu_solve().
calculates determinant of an already LU decomposed Matrix
Definition at line 281 of file lu_solver.h.
References ALIGN2, BCHK, TMatrix< T >::columns(), TMatrix< T >::get(), i, MIN_ALIGN2, REGISTER, TMatrix< T >::rows(), and T.
Referenced by lu_det().
calculates determinant of a Matrix by LU decomposition
Definition at line 293 of file lu_solver.h.
References lu_decomp(), LU_det(), and T.
Definition at line 183 of file lu_solver.h.
References ALIGN2, BCHK, TMatrix< T >::get(), i, MIN_ALIGN2, REGISTER, TMatrix< T >::rows(), T, x, and y.
Referenced by LU_solve(), and LU_solve().
Returns the inverse of a already LU decomposed Matrix.
Definition at line 303 of file lu_solver.h.
References BCHK, TMatrix< T >::columns(), inv(), LU_solve(), TMatrix< T >::rows(), TVector< T >::setval(), T, and y.
Referenced by lu_invert().
Returns the inverse of a Matrix by performing a LU decomposition.
Definition at line 320 of file lu_solver.h.
References lu_decomp(), and LU_invert().
Definition at line 258 of file lu_solver.h.
References b, i, LU_bkw_subst(), LU_fwd_subst(), x, and y.
Solve the equation Ax = b where A IS already LU decomposed
Definition at line 225 of file lu_solver.h.
References b, LU_bkw_subst(), LU_fwd_subst(), and y.
Referenced by LU_invert(), lu_solve(), and lu_solve().
Definition at line 272 of file lu_solver.h.
References b, lu_decomp(), and LU_solve().
Solve the equation Ax = b where A still needs to be LU decomposed
Definition at line 240 of file lu_solver.h.
References b, BCHK, BVector< T >::copy(), fabs(), lu_decomp(), LU_solve(), MATH__, MLU_RES_WARN, res, and x.