|
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. More... | |
| 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 More... | |
| template<typename T > | |
| T | lu_det (Matrix< T > &mat) |
| calculates determinant of a Matrix by LU decomposition More... | |
| template<typename T > | |
| TMatrix< T > | LU_invert (const Matrix< T > &mat) |
| Returns the inverse of a already LU decomposed Matrix. More... | |
| template<typename T > | |
| TMatrix< T > | lu_invert (Matrix< T > &mat) |
| Returns the inverse of a Matrix by performing a LU decomposition. More... | |
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, TVector< T >::get(), TMatrix< T >::get(), i, MIN_ALIGN2, REGISTER, TMatrix< T >::rows(), TVector< T >::set(), TVector< T >::size(), T, x, and y.
| 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, std::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 lu_det(), lu_invert(), 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.
calculates determinant of a Matrix by LU decomposition
Definition at line 293 of file lu_solver.h.
References lu_decomp(), and LU_det().
Definition at line 183 of file lu_solver.h.
References ALIGN2, BCHK, TVector< T >::get(), TMatrix< T >::get(), i, MIN_ALIGN2, REGISTER, TMatrix< T >::rows(), TVector< T >::set(), TVector< T >::size(), T, x, and y.
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(), T, v, and y.
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().
Solve the equation Ax = b where A IS already LU decomposed
Definition at line 225 of file lu_solver.h.
References LU_bkw_subst(), LU_fwd_subst(), and y.
Solve the equation Ax = b where A still needs to be LU decomposed
Definition at line 240 of file lu_solver.h.
References BCHK, BVector< T >::copy(), std::fabs(), lu_decomp(), LU_solve(), MATH__, MLU_RES_WARN, res, TVector< T >::size(), and x.
Definition at line 258 of file lu_solver.h.
References TMatrix< T >::columns(), TMatrix< T >::get_col(), i, LU_bkw_subst(), LU_fwd_subst(), TMatrix< T >::rows(), x, and y.
Definition at line 272 of file lu_solver.h.
References lu_decomp(), and LU_solve().
1.8.5