sofa::component::linearsolver::TNewMatMatrix< Mat > Class Template Reference

#include <NewMatMatrix.h>

Inheritance diagram for sofa::component::linearsolver::TNewMatMatrix< Mat >:

Inheritance graph
[legend]
Collaboration diagram for sofa::component::linearsolver::TNewMatMatrix< Mat >:

Collaboration graph
[legend]

Public Types

typedef Mat M
typedef TNewMatMatrix
< NEWMAT::Matrix > 
SubMatrixType
typedef TNewMatMatrix
< NEWMAT::Matrix > 
InvMatrixType
typedef
NEWMAT::LinearEquationSolver 
LUSolver

Public Member Functions

 TNewMatMatrix (int defaultBandWidth=11)
void resize (int nbRow, int nbCol)
 Resize the matrix and reset all values to 0.
int rowSize (void) const
 Number of rows.
int colSize (void) const
 Number of columns.
SReal element (int i, int j) const
 Read the value of the element at row i, column j (using 0-based indices).
void set (int i, int j, double v)
 Write the value of the element at row i, column j (using 0-based indices).
void add (int i, int j, double v)
 Add v to the existing value of the element at row i, column j (using 0-based indices).
void clear (int i, int j)
void clearRow (int i)
 Reset the value of row i to 0.
void clearCol (int j)
 Reset the value of column j to 0.
void clearRowCol (int i)
 Reset the value of both row and column i to 0.
NEWMAT::GetSubMatrix sub (int i, int j, int nrow, int ncol)
template<class T >
void getSubMatrix (int i, int j, int nrow, int ncol, T &m)
template<class T >
void setSubMatrix (int i, int j, int nrow, int ncol, const T &m)
void solve (NewMatVector *rv, NewMatVector *ov)
virtual void solve (defaulttype::BaseVector *op, defaulttype::BaseVector *res)
LUSolver * makeLUSolver ()
void solve (NewMatVector *rv, NewMatVector *ov, LUSolver *solver)
template<class T >
void operator= (const T &m)
void clear ()
 Reset all values to 0.
template<>
const char * Name ()
template<>
const char * Name ()
template<>
const char * Name ()
template<>
const char * Name ()
template<>
void resize (int nbRow, int nbCol)
 Resize the matrix and reset all values to 0.
template<>
void resize (int nbRow, int nbCol)
 Resize the matrix and reset all values to 0.
template<>
void resize (int nbRow, int nbCol)
 Resize the matrix and reset all values to 0.
template<>
void set (int i, int j, double v)
 Write the value of the element at row i, column j (using 0-based indices).
template<>
void add (int i, int j, double v)
 Add v to the existing value of the element at row i, column j (using 0-based indices).
template<>
SReal element (int i, int j) const
 Read the value of the element at row i, column j (using 0-based indices).
template<>
void set (int i, int j, double v)
 Write the value of the element at row i, column j (using 0-based indices).
template<>
void add (int i, int j, double v)
 Add v to the existing value of the element at row i, column j (using 0-based indices).
template<>
SReal element (int i, int j) const
 Read the value of the element at row i, column j (using 0-based indices).
template<>
void set (int i, int j, double v)
 Write the value of the element at row i, column j (using 0-based indices).
template<>
void add (int i, int j, double v)
 Add v to the existing value of the element at row i, column j (using 0-based indices).

Static Public Member Functions

static const char * Name ()

Data Fields

int bandWidth

Friends

std::ostream & operator<< (std::ostream &out, const TNewMatMatrix &v)

Detailed Description

template<class Mat>
class sofa::component::linearsolver::TNewMatMatrix< Mat >

Definition at line 45 of file NewMatMatrix.h.


Member Typedef Documentation

template<class Mat >
typedef TNewMatMatrix<NEWMAT::Matrix> sofa::component::linearsolver::TNewMatMatrix< Mat >::InvMatrixType

Definition at line 51 of file NewMatMatrix.h.

template<class Mat >
typedef NEWMAT::LinearEquationSolver sofa::component::linearsolver::TNewMatMatrix< Mat >::LUSolver

Definition at line 52 of file NewMatMatrix.h.

template<class Mat >
typedef Mat sofa::component::linearsolver::TNewMatMatrix< Mat >::M

Definition at line 48 of file NewMatMatrix.h.

template<class Mat >
typedef TNewMatMatrix<NEWMAT::Matrix> sofa::component::linearsolver::TNewMatMatrix< Mat >::SubMatrixType

Definition at line 50 of file NewMatMatrix.h.


Constructor & Destructor Documentation

template<class Mat >
sofa::component::linearsolver::TNewMatMatrix< Mat >::TNewMatMatrix ( int  defaultBandWidth = 11  )  [inline, explicit]

Definition at line 53 of file NewMatMatrix.h.


Member Function Documentation

template<>
void sofa::component::linearsolver::TNewMatMatrix< NEWMAT::SymmetricBandMatrix >::add ( int  i,
int  j,
double  v 
) [inline, virtual]

template<>
void sofa::component::linearsolver::TNewMatMatrix< NEWMAT::BandMatrix >::add ( int  i,
int  j,
double  v 
) [inline, virtual]

template<>
void sofa::component::linearsolver::TNewMatMatrix< NEWMAT::SymmetricMatrix >::add ( int  i,
int  j,
double  v 
) [inline, virtual]

template<class Mat >
void sofa::component::linearsolver::TNewMatMatrix< Mat >::add ( int  i,
int  j,
double  v 
) [inline, virtual]

template<class Mat >
void sofa::component::linearsolver::TNewMatMatrix< Mat >::clear (  )  [inline, virtual]

Reset all values to 0.

Implements sofa::defaulttype::BaseMatrix.

Definition at line 236 of file NewMatMatrix.h.

template<class Mat >
void sofa::component::linearsolver::TNewMatMatrix< Mat >::clear ( int  i,
int  j 
) [inline, virtual]

template<class Mat >
void sofa::component::linearsolver::TNewMatMatrix< Mat >::clearCol ( int  j  )  [inline, virtual]

template<class Mat >
void sofa::component::linearsolver::TNewMatMatrix< Mat >::clearRow ( int  i  )  [inline, virtual]

template<class Mat >
void sofa::component::linearsolver::TNewMatMatrix< Mat >::clearRowCol ( int  i  )  [inline, virtual]

Reset the value of both row and column i to 0.

Reimplemented from sofa::defaulttype::BaseMatrix.

Definition at line 164 of file NewMatMatrix.h.

References sofa::component::linearsolver::TNewMatMatrix< Mat >::colSize(), and sofa::component::linearsolver::TNewMatMatrix< Mat >::rowSize().

template<class Mat >
int sofa::component::linearsolver::TNewMatMatrix< Mat >::colSize ( void   )  const [inline, virtual]

template<>
SReal sofa::component::linearsolver::TNewMatMatrix< NEWMAT::SymmetricBandMatrix >::element ( int  i,
int  j 
) const [inline, virtual]

template<>
SReal sofa::component::linearsolver::TNewMatMatrix< NEWMAT::BandMatrix >::element ( int  i,
int  j 
) const [inline, virtual]

template<class Mat >
SReal sofa::component::linearsolver::TNewMatMatrix< Mat >::element ( int  i,
int  j 
) const [inline, virtual]

template<class Mat >
template<class T >
void sofa::component::linearsolver::TNewMatMatrix< Mat >::getSubMatrix ( int  i,
int  j,
int  nrow,
int  ncol,
T &  m 
) [inline]

Definition at line 186 of file NewMatMatrix.h.

template<class Mat >
LUSolver* sofa::component::linearsolver::TNewMatMatrix< Mat >::makeLUSolver (  )  [inline]

Definition at line 217 of file NewMatMatrix.h.

template<>
const char * sofa::component::linearsolver::TNewMatMatrix< NEWMAT::SymmetricBandMatrix >::Name (  )  [inline]

Definition at line 276 of file NewMatMatrix.h.

template<>
const char * sofa::component::linearsolver::TNewMatMatrix< NEWMAT::BandMatrix >::Name (  )  [inline]

Definition at line 273 of file NewMatMatrix.h.

template<>
const char * sofa::component::linearsolver::TNewMatMatrix< NEWMAT::SymmetricMatrix >::Name (  )  [inline]

Definition at line 270 of file NewMatMatrix.h.

template<>
const char * sofa::component::linearsolver::TNewMatMatrix< NEWMAT::Matrix >::Name (  )  [inline]

Definition at line 267 of file NewMatMatrix.h.

template<class Mat >
static const char* sofa::component::linearsolver::TNewMatMatrix< Mat >::Name (  )  [static]

template<class Mat >
template<class T >
void sofa::component::linearsolver::TNewMatMatrix< Mat >::operator= ( const T &  m  )  [inline]

Definition at line 234 of file NewMatMatrix.h.

References sofa::defaulttype::Mat< L, C, real >::operator=().

template<>
void sofa::component::linearsolver::TNewMatMatrix< NEWMAT::SymmetricBandMatrix >::resize ( int  nbRow,
int  nbCol 
) [inline, virtual]

Resize the matrix and reset all values to 0.

Implements sofa::defaulttype::BaseMatrix.

Definition at line 295 of file NewMatMatrix.h.

References sofa::component::linearsolver::TNewMatMatrix< Mat >::bandWidth.

template<>
void sofa::component::linearsolver::TNewMatMatrix< NEWMAT::BandMatrix >::resize ( int  nbRow,
int  nbCol 
) [inline, virtual]

Resize the matrix and reset all values to 0.

Implements sofa::defaulttype::BaseMatrix.

Definition at line 287 of file NewMatMatrix.h.

References sofa::component::linearsolver::TNewMatMatrix< Mat >::bandWidth.

template<>
void sofa::component::linearsolver::TNewMatMatrix< NEWMAT::SymmetricMatrix >::resize ( int  nbRow,
int  nbCol 
) [inline, virtual]

Resize the matrix and reset all values to 0.

Implements sofa::defaulttype::BaseMatrix.

Definition at line 279 of file NewMatMatrix.h.

template<class Mat >
void sofa::component::linearsolver::TNewMatMatrix< Mat >::resize ( int  nbRow,
int  nbCol 
) [inline, virtual]

Resize the matrix and reset all values to 0.

Implements sofa::defaulttype::BaseMatrix.

Definition at line 58 of file NewMatMatrix.h.

template<class Mat >
int sofa::component::linearsolver::TNewMatMatrix< Mat >::rowSize ( void   )  const [inline, virtual]

template<>
void sofa::component::linearsolver::TNewMatMatrix< NEWMAT::SymmetricBandMatrix >::set ( int  i,
int  j,
double  v 
) [inline, virtual]

template<>
void sofa::component::linearsolver::TNewMatMatrix< NEWMAT::BandMatrix >::set ( int  i,
int  j,
double  v 
) [inline, virtual]

template<>
void sofa::component::linearsolver::TNewMatMatrix< NEWMAT::SymmetricMatrix >::set ( int  i,
int  j,
double  v 
) [inline, virtual]

template<class Mat >
void sofa::component::linearsolver::TNewMatMatrix< Mat >::set ( int  i,
int  j,
double  v 
) [inline, virtual]

template<class Mat >
template<class T >
void sofa::component::linearsolver::TNewMatMatrix< Mat >::setSubMatrix ( int  i,
int  j,
int  nrow,
int  ncol,
const T &  m 
) [inline]

Definition at line 192 of file NewMatMatrix.h.

template<class Mat >
void sofa::component::linearsolver::TNewMatMatrix< Mat >::solve ( NewMatVector *  rv,
NewMatVector *  ov,
LUSolver *  solver 
) [inline]

template<class Mat >
virtual void sofa::component::linearsolver::TNewMatMatrix< Mat >::solve ( defaulttype::BaseVector *  op,
defaulttype::BaseVector *  res 
) [inline, virtual]

template<class Mat >
void sofa::component::linearsolver::TNewMatMatrix< Mat >::solve ( NewMatVector *  rv,
NewMatVector *  ov 
) [inline]

template<class Mat >
NEWMAT::GetSubMatrix sofa::component::linearsolver::TNewMatMatrix< Mat >::sub ( int  i,
int  j,
int  nrow,
int  ncol 
) [inline]

Definition at line 180 of file NewMatMatrix.h.


Friends And Related Function Documentation

template<class Mat >
std::ostream& operator<< ( std::ostream &  out,
const TNewMatMatrix< Mat > &  v 
) [friend]

Definition at line 238 of file NewMatMatrix.h.


Field Documentation


The documentation for this class was generated from the following file:

Generated on Sun Nov 23 04:20:29 2008 for Sofa by  doxygen 1.5.7.1