Main Page   Class Hierarchy   Compound List   File List   Compound Members  

PLib::LUMatrix Class Template Reference

a class for the LU decomposition of a matrix. More...

#include <matrix/matrixMat.h>

Inheritance diagram for PLib::LUMatrix:

PLib::Matrix PLib::Basic2DArray List of all members.

Public Methods

 LUMatrix (int r, int c)
 LUMatrix ()
 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)
determinant ()
Matrix< T > inverse ()
void inverseIn (Matrix< T > &)

Public Attributes

const Vector< int > & pivot

Protected Attributes

int errval
int sign

Detailed Description

template<class T>
class PLib::LUMatrix< T >

a class for the LU decomposition of a matrix.

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).

Author:
Skip Carter , Philippe Lavoie
Date:
22 October 1997

Definition at line 62 of file matrixMat.h.


Member Function Documentation

template<class T>
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.

Parameters:
a  the matrix to decompose
Returns:
a reference to itself
Author:
Philippe Lavoie
Date:
22 October 1997

Definition at line 70 of file matrixMat.cpp.

References resize.

template<class T>
T PLib::LUMatrix< T >::determinant  
 

Finds the determinant of a LU matrix.

Finds the determinant of a LU matrix.

Returns:
The value of the determinant
Author:
Philippe Lavoie
Date:
22 October 1997

Definition at line 198 of file matrixMat.cpp.

References PLib::Basic2DArray::rows.

template<class T>
Matrix< T > PLib::LUMatrix< T >::inverse  
 

Finds the inverse of the LU matrix.

Finds the inverse of the LU matrix.

Returns:
the inverse of the matrix
Author:
Philippe Lavoie
Date:
22 October 1997

Definition at line 339 of file matrixMat.cpp.

References PLib::Basic2DArray::cols, inverse, inverseIn, and PLib::Basic2DArray::rows.

Referenced by inverse.

template<class T>
void PLib::LUMatrix< T >::inverseIn Matrix< T > &    inv
 

Finds the inverse of the LU matrix.

Finds the inverse of the LU matrix.

Parameters:
inv  the inverse of the matrix
Author:
Philippe Lavoie
Date:
22 October 1997

Definition at line 251 of file matrixMat.cpp.

References PLib::Basic2DArray::cols, and PLib::Basic2DArray::rows.

Referenced by inverse.

template<class T>
LUMatrix< T > & PLib::LUMatrix< T >::operator= const LUMatrix< T > &    a
 

assignment operator.

Assignment operator

Parameters:
a  the LU matrix to copy
Returns:
a reference to itself
Author:
Philippe Lavoie
Date:
22 October 1997

Definition at line 49 of file matrixMat.cpp.

References PLib::Basic2DArray::cols, resize, and PLib::Basic2DArray::rows.

template<class T>
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.

Parameters:
nr  the new number of rows
nc  the new number of columns
Author:
Philippe Lavoie
Date:
24 January 1997

Reimplemented from PLib::Basic2DArray.

Definition at line 70 of file matrixMat.h.

Referenced by decompose, and operator=.


The documentation for this class was generated from the following files:
Generated on Tue Jun 24 13:26:59 2003 for NURBS++ by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002