![]() |
SynAPSE
0.6.0
Synergistic Analysis of Phase Space Evolution
|
Defines the LU decomposition algorithm of a square matrix. More...
#include <DecompLU.hh>
Public Member Functions | |
| DecompLU () | |
| Default constructor, initilizes an empty matrix of dimension 0x0. More... | |
| DecompLU (std::vector< std::vector< T >> mat) | |
| Std constructor, sets the underlying std matrix. More... | |
| DecompLU (const DecompLU &decLU) | |
| Copy constructor. More... | |
| DecompLU & | operator= (const DecompLU &decLU) |
| Equality operator. More... | |
| ~DecompLU () | |
| Destructor. More... | |
| void | DecomposeCrout (std::vector< std::vector< T >> mat) |
| Decomposes a square matrix into a parity matrix P, a lower triangular matrix L and an upper triangular matrix U. More... | |
| T | Determinant () |
| Returns the determinant of the decomposed matrix. More... | |
| std::vector< std::vector< T > > | NewMatrix (size_t m, size_t n) |
| Returns a matrix of m rows and n columns. More... | |
| const T & | Factor () |
| Gets and returns the parity of the permutations. More... | |
| const bool & | Complete () |
| Gets and returns whether the LU decomposition was successful or not. More... | |
| const std::vector< std::vector < T > > & | P () |
| Gets and returns the permutation matrix. More... | |
| const std::vector< T > & | Pivots () |
| Gets and returns the permutation vector, contains the ids of the rows. More... | |
| const std::vector< std::vector < T > > & | L () |
| Gets and returns the lower triangular matrix. More... | |
| const std::vector< std::vector < T > > & | U () |
| Gets and returns the upper triangular matrix. More... | |
Private Attributes | |
| T | _fact |
| Parity of the permutation (1 or -1) More... | |
| bool | _complete |
| True if the decomposition was successful. More... | |
| std::vector< std::vector< T > > | _P |
| Permutation matrix. More... | |
| std::vector< T > | _pivots |
| Premutation vector (IDs of the rows) More... | |
| std::vector< std::vector< T > > | _L |
| L Matrix. More... | |
| std::vector< std::vector< T > > | _U |
| U Matrix. More... | |
Defines the LU decomposition algorithm of a square matrix.
The matrices L and U are such that
or
with
is the permutation applied to the matrix to decompose;
is a lower triangular matrix of diagonal elements unity;
is an upper triangular matrix. Default constructor, initilizes an empty matrix of dimension 0x0.
Std constructor, sets the underlying std matrix.
|
inline |
Gets and returns whether the LU decomposition was successful or not.
| void DecompLU< T >::DecomposeCrout | ( | std::vector< std::vector< T >> | mat | ) |
Decomposes a square matrix into a parity matrix P, a lower triangular matrix L and an upper triangular matrix U.
| mat | Input square matrix |
| T DecompLU< T >::Determinant | ( | ) |
Returns the determinant of the decomposed matrix.
|
inline |
Gets and returns the parity of the permutations.
|
inline |
Gets and returns the lower triangular matrix.
| std::vector< std::vector< T > > DecompLU< T >::NewMatrix | ( | size_t | m, |
| size_t | n | ||
| ) |
Returns a matrix of m rows and n columns.
| m | Number of rows |
| n | Number of columns |
Equality operator.
|
inline |
Gets and returns the permutation matrix.
|
inline |
Gets and returns the permutation vector, contains the ids of the rows.
|
inline |
Gets and returns the upper triangular matrix.
|
private |
True if the decomposition was successful.
|
private |
Parity of the permutation (1 or -1)
|
private |
Permutation matrix.
|
private |
Premutation vector (IDs of the rows)
1.8.6