last update 20 Sep 2009 |
#include <cvrLuDecomposition.h>
Classes | |
class | parameters |
The parameters for the class luDecomposition. More... | |
Public Member Functions | |
luDecomposition () | |
luDecomposition (const parameters &par) | |
luDecomposition (const luDecomposition &other) | |
virtual | ~luDecomposition () |
bool | apply (matrix< T > &a, vector< integer > &permutation, int &pivot) const |
bool | apply (const matrix< T > &a, matrix< T > &lu, vector< integer > &permutation, int &pivot) const |
luDecomposition< T > & | copy (const luDecomposition< T > &other) |
const std::string & | name () const |
virtual luDecomposition< T > * | clone () const |
virtual luDecomposition< T > * | newInstance () const |
const parameters & | getParameters () const |
matrix< T > | extractL (const matrix< T > &lu) const |
matrix< T > | extractU (const matrix< T > &lu) const |
void | extractL (const matrix< T > &lu, matrix< T > &l) const |
void | extractU (const matrix< T > &lu, matrix< T > &u) const |
void | buildPermutationMatrix (const vector< integer > &pv, matrix< T > &pm) const |
Computes the LU decomposition of a square matrix.
This class uses LAPACK if it is available. Note that if LAPACK is not used or not available, A must be of full rank!
cvr::luDecomposition< T >::luDecomposition | ( | ) |
Default constructor.
cvr::luDecomposition< T >::luDecomposition | ( | const parameters & | par | ) |
Construct a functor using the given parameters.
cvr::luDecomposition< T >::luDecomposition | ( | const luDecomposition< T > & | other | ) |
virtual cvr::luDecomposition< T >::~luDecomposition | ( | ) | [virtual] |
Destructor.
bool cvr::luDecomposition< T >::apply | ( | const matrix< T > & | a, | |
matrix< T > & | lu, | |||
vector< integer > & | permutation, | |||
int & | pivot | |||
) | const |
onCopy version of apply.
Given a matrix a[0..n-1][0..n-1], this routine returns a matrix decomposition[0..n-1][0..n-1] which contains the LU decomposition of a rowwise permutation of theMatrix. permutation[0..n-1] is an output vector that records the row permutation effected by the partial pivoting. 'pivot' is +/-1 depending on whether the number of row interchanges was even or odd, respectively.
bool cvr::luDecomposition< T >::apply | ( | matrix< T > & | a, | |
vector< integer > & | permutation, | |||
int & | pivot | |||
) | const |
onPlace version of apply.
Given a matrix a[0..n-1][0..n-1], this routine replaces it by the LU decomposition of a rowwise permutation of itself. permutation[0..n-1] is an output vector that records the row permutation effected by the partial pivoting. 'pivot' is +/-1 depending on whether the number of row interchanges was even or odd, respectively.
void cvr::luDecomposition< T >::buildPermutationMatrix | ( | const vector< integer > & | pv, | |
matrix< T > & | pm | |||
) | const |
virtual luDecomposition<T>* cvr::luDecomposition< T >::clone | ( | ) | const [virtual] |
luDecomposition<T>& cvr::luDecomposition< T >::copy | ( | const luDecomposition< T > & | other | ) |
Copy data of "other" functor.
void cvr::luDecomposition< T >::extractL | ( | const matrix< T > & | lu, | |
matrix< T > & | l | |||
) | const |
Returns a new Matrix which contains the "L" part of the given LU decomposition.
This is much faster than the on copy version.
matrix<T> cvr::luDecomposition< T >::extractL | ( | const matrix< T > & | lu | ) | const |
Returns a new Matrix which contains the "L" part of the given LU decomposition.
void cvr::luDecomposition< T >::extractU | ( | const matrix< T > & | lu, | |
matrix< T > & | u | |||
) | const |
Returns a new Matrix which contains the "U" part of the given LU decomposition.
This is much faster than the on copy version.
matrix<T> cvr::luDecomposition< T >::extractU | ( | const matrix< T > & | lu | ) | const |
Returns a new Matrix which contains the "U" part of the given LU decomposition.
const parameters& cvr::luDecomposition< T >::getParameters | ( | ) | const |
const std::string& cvr::luDecomposition< T >::name | ( | ) | const [virtual] |
virtual luDecomposition<T>* cvr::luDecomposition< T >::newInstance | ( | ) | const [virtual] |