#include <matrix/matrixMat.h>
Inheritance diagram for PLib::LUMatrix< T >:
Public Member Functions | |
LUMatrix (int r, int c) | |
LUMatrix (const LUMatrix< T > &lu) | |
LUMatrix (const Matrix< T > &a) | |
void | resize (const int r, const int c) |
LUMatrix & | operator= (const LUMatrix< T > &) |
LUMatrix & | decompose (const Matrix< T > &a) |
T | determinant () |
Matrix< T > | inverse () |
void | inverseIn (Matrix< T > &) |
Public Attributes | |
const Vector< int > & | pivot |
Protected Attributes | |
int | errval |
int | sign |
This class was adapted from a class in the Kalman library written by Skip Carter (skip@taygeta.oc.nps.navy.mil
It performs the LU decomposition of a matrix. It can be used to find it's inverse and to solve linear systems.
This class can only be used with floating point values (float or double).
void PLib::LUMatrix< T >::resize | ( | const int | r, | |
const int | c | |||
) | [inline] |
a destructive resize of the matrix dimensions
Changes the matrix dimensions and intialize it to 0.
nr | the new number of rows | |
nc | the new number of columns |
Reimplemented from PLib::Basic2DArray< T >.
LUMatrix< T > & PLib::LUMatrix< T >::operator= | ( | const LUMatrix< T > & | a | ) |
assignment operator
Assignment operator
a | the LU matrix to copy |
LUMatrix< T > & PLib::LUMatrix< T >::decompose | ( | const Matrix< T > & | a | ) |
Generetes a LU matrix from a matrix a.
Generetes a LU matrix from a matrix a.
a | the matrix to decompose |
T PLib::LUMatrix< T >::determinant | ( | ) |
Finds the determinant of a LU matrix.
Finds the determinant of a LU matrix.
Matrix< T > PLib::LUMatrix< T >::inverse | ( | ) |
Finds the inverse of the LU matrix.
Finds the inverse of the LU matrix.
void PLib::LUMatrix< T >::inverseIn | ( | Matrix< T > & | inv | ) |
Finds the inverse of the LU matrix.
Finds the inverse of the LU matrix.
inv | the inverse of the matrix |