sofa::component::linearsolver::FullMatrix< T > Class Template Reference

Simple full matrix container. More...

#include <FullMatrix.h>

Inheritance diagram for sofa::component::linearsolver::FullMatrix< T >:

Inheritance graph
[legend]
Collaboration diagram for sofa::component::linearsolver::FullMatrix< T >:

Collaboration graph
[legend]

Data Structures

class  LineConstIterator
class  LineIterator

Public Types

typedef T Real
typedef int Index
typedef FullVector< Real > Line
typedef Line::iterator LElementIterator
typedef Line::const_iterator LElementConstIterator

Public Member Functions

 FullMatrix ()
 FullMatrix (int nbRow, int nbCol)
 FullMatrix (Real *p, int nbRow, int nbCol)
 FullMatrix (Real *p, int nbRow, int nbCol, int pitch)
 ~FullMatrix ()
Real * ptr ()
const Real * ptr () const
LineIterator begin ()
LineIterator end ()
LineConstIterator begin () const
LineConstIterator end () const
Real * operator[] (Index i)
const Real * operator[] (Index i) const
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.
void clear ()
 Reset all values to 0.
template<class Real2 >
FullVector< Real2 > operator* (const FullVector< Real2 > &v) const

Static Public Member Functions

static const char * Name ()

Protected Attributes

Real * data
Index nRow
Index nCol
Index pitch
Index allocsize

Friends

std::ostream & operator<< (std::ostream &out, const FullMatrix< T > &v)

Detailed Description

template<typename T>
class sofa::component::linearsolver::FullMatrix< T >

Simple full matrix container.

Definition at line 49 of file FullMatrix.h.


Member Typedef Documentation

template<typename T >
typedef int sofa::component::linearsolver::FullMatrix< T >::Index

Definition at line 53 of file FullMatrix.h.

template<typename T >
typedef Line::const_iterator sofa::component::linearsolver::FullMatrix< T >::LElementConstIterator

Definition at line 78 of file FullMatrix.h.

template<typename T >
typedef Line::iterator sofa::component::linearsolver::FullMatrix< T >::LElementIterator

Definition at line 77 of file FullMatrix.h.

template<typename T >
typedef FullVector<Real> sofa::component::linearsolver::FullMatrix< T >::Line

Definition at line 54 of file FullMatrix.h.

template<typename T >
typedef T sofa::component::linearsolver::FullMatrix< T >::Real

Definition at line 52 of file FullMatrix.h.


Constructor & Destructor Documentation

template<typename T >
sofa::component::linearsolver::FullMatrix< T >::FullMatrix (  )  [inline]

Definition at line 88 of file FullMatrix.h.

template<typename T >
sofa::component::linearsolver::FullMatrix< T >::FullMatrix ( int  nbRow,
int  nbCol 
) [inline]

Definition at line 93 of file FullMatrix.h.

template<typename T >
sofa::component::linearsolver::FullMatrix< T >::FullMatrix ( Real *  p,
int  nbRow,
int  nbCol 
) [inline]

Definition at line 98 of file FullMatrix.h.

template<typename T >
sofa::component::linearsolver::FullMatrix< T >::FullMatrix ( Real *  p,
int  nbRow,
int  nbCol,
int  pitch 
) [inline]

Definition at line 103 of file FullMatrix.h.

template<typename T >
sofa::component::linearsolver::FullMatrix< T >::~FullMatrix (  )  [inline]

Definition at line 108 of file FullMatrix.h.


Member Function Documentation

template<typename T >
void sofa::component::linearsolver::FullMatrix< T >::add ( int  i,
int  j,
double  v 
) [inline, virtual]

Add v to the existing value of the element at row i, column j (using 0-based indices).

Implements sofa::defaulttype::BaseMatrix.

Definition at line 211 of file FullMatrix.h.

template<typename T >
LineConstIterator sofa::component::linearsolver::FullMatrix< T >::begin (  )  const [inline]

Definition at line 119 of file FullMatrix.h.

template<typename T >
LineIterator sofa::component::linearsolver::FullMatrix< T >::begin (  )  [inline]

Definition at line 117 of file FullMatrix.h.

template<typename T >
void sofa::component::linearsolver::FullMatrix< T >::clear (  )  [inline, virtual]

template<typename T >
void sofa::component::linearsolver::FullMatrix< T >::clear ( int  i,
int  j 
) [inline, virtual]

Reimplemented from sofa::defaulttype::BaseMatrix.

Definition at line 226 of file FullMatrix.h.

template<typename T >
void sofa::component::linearsolver::FullMatrix< T >::clearCol ( int  j  )  [inline, virtual]

Reset the value of column j to 0.

Reimplemented from sofa::defaulttype::BaseMatrix.

Definition at line 257 of file FullMatrix.h.

Referenced by sofa::component::linearsolver::FullMatrix< double >::clearRowCol().

template<typename T >
void sofa::component::linearsolver::FullMatrix< T >::clearRow ( int  i  )  [inline, virtual]

Reset the value of row i to 0.

Reimplemented from sofa::defaulttype::BaseMatrix.

Definition at line 241 of file FullMatrix.h.

Referenced by sofa::component::linearsolver::FullMatrix< double >::clearRowCol().

template<typename T >
void sofa::component::linearsolver::FullMatrix< T >::clearRowCol ( int  i  )  [inline, virtual]

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

Reimplemented from sofa::defaulttype::BaseMatrix.

Definition at line 273 of file FullMatrix.h.

template<typename T >
int sofa::component::linearsolver::FullMatrix< T >::colSize ( void   )  const [inline, virtual]

template<typename T >
SReal sofa::component::linearsolver::FullMatrix< T >::element ( int  i,
int  j 
) const [inline, virtual]

Read the value of the element at row i, column j (using 0-based indices).

Implements sofa::defaulttype::BaseMatrix.

Definition at line 184 of file FullMatrix.h.

Referenced by sofa::component::constraint::LinearSolverConstraintCorrection< TDataTypes >::getCompliance().

template<typename T >
LineConstIterator sofa::component::linearsolver::FullMatrix< T >::end (  )  const [inline]

Definition at line 120 of file FullMatrix.h.

template<typename T >
LineIterator sofa::component::linearsolver::FullMatrix< T >::end (  )  [inline]

Definition at line 118 of file FullMatrix.h.

template<typename T >
static const char* sofa::component::linearsolver::FullMatrix< T >::Name (  )  [inline, static]

Definition at line 331 of file FullMatrix.h.

template<typename T >
template<class Real2 >
FullVector<Real2> sofa::component::linearsolver::FullMatrix< T >::operator* ( const FullVector< Real2 > &  v  )  const [inline]

Definition at line 300 of file FullMatrix.h.

template<typename T >
const Real* sofa::component::linearsolver::FullMatrix< T >::operator[] ( Index  i  )  const [inline]

Definition at line 136 of file FullMatrix.h.

template<typename T >
Real* sofa::component::linearsolver::FullMatrix< T >::operator[] ( Index  i  )  [inline]

Definition at line 126 of file FullMatrix.h.

template<typename T >
const Real* sofa::component::linearsolver::FullMatrix< T >::ptr (  )  const [inline]

Definition at line 115 of file FullMatrix.h.

template<typename T >
Real* sofa::component::linearsolver::FullMatrix< T >::ptr (  )  [inline]

Definition at line 114 of file FullMatrix.h.

template<typename T >
void sofa::component::linearsolver::FullMatrix< T >::resize ( int  nbRow,
int  nbCol 
) [inline, virtual]

template<typename T >
int sofa::component::linearsolver::FullMatrix< T >::rowSize ( void   )  const [inline, virtual]

template<typename T >
void sofa::component::linearsolver::FullMatrix< T >::set ( int  i,
int  j,
double  v 
) [inline, virtual]

Write the value of the element at row i, column j (using 0-based indices).

Implements sofa::defaulttype::BaseMatrix.

Definition at line 196 of file FullMatrix.h.


Friends And Related Function Documentation

template<typename T >
std::ostream& operator<< ( std::ostream &  out,
const FullMatrix< T > &  v 
) [friend]

Definition at line 313 of file FullMatrix.h.


Field Documentation

template<typename T >
Index sofa::component::linearsolver::FullMatrix< T >::allocsize [protected]

template<typename T >
Real* sofa::component::linearsolver::FullMatrix< T >::data [protected]

template<typename T >
Index sofa::component::linearsolver::FullMatrix< T >::nCol [protected]

template<typename T >
Index sofa::component::linearsolver::FullMatrix< T >::nRow [protected]

template<typename T >
Index sofa::component::linearsolver::FullMatrix< T >::pitch [protected]


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

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