#include <SparseMatrix.h>


Public Types | |
| typedef T | Real |
| typedef int | Index |
| typedef std::map< Index, Real > | Line |
| typedef std::map< Index, Line > | Data |
| typedef Line::iterator | LElementIterator |
| typedef Line::const_iterator | LElementConstIterator |
| typedef Data::iterator | LineIterator |
| typedef Data::const_iterator | LineConstIterator |
Public Member Functions | |
| SparseMatrix () | |
| SparseMatrix (int nbRow, int nbCol) | |
| LineIterator | begin () |
| LineIterator | end () |
| LineConstIterator | begin () const |
| LineConstIterator | end () const |
| Line & | operator[] (Index i) |
| const Line & | 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 > | |
| void | mul (FullVector< Real2 > &res, const FullVector< Real2 > &v) const |
| template<class Real2 > | |
| void | mulTranspose (FullVector< Real2 > &res, const FullVector< Real2 > &v) const |
| template<class Real2 > | |
| void | mul (FullVector< Real2 > &res, const defaulttype::BaseVector *v) const |
| template<class Real2 > | |
| void | mulTranspose (FullVector< Real2 > &res, const defaulttype::BaseVector *v) const |
| template<class Real2 > | |
| void | mul (defaulttype::BaseVector *res, const FullVector< Real2 > &v) const |
| template<class Real2 > | |
| void | mulTranspose (defaulttype::BaseVector *res, const FullVector< Real2 > &v) const |
| void | mul (defaulttype::BaseVector *res, const defaulttype::BaseVector *v) const |
| void | mulTranspose (defaulttype::BaseVector *res, const defaulttype::BaseVector *v) const |
| template<class Real2 > | |
| FullVector< Real2 > | operator* (const FullVector< Real2 > &v) const |
Static Public Member Functions | |
| static const char * | Name () |
Protected Attributes | |
| Data | data |
| Index | nRow |
| Index | nCol |
Friends | |
| std::ostream & | operator<< (std::ostream &out, const SparseMatrix< T > &v) |
Definition at line 47 of file SparseMatrix.h.
| typedef std::map<Index,Line> sofa::component::linearsolver::SparseMatrix< T >::Data |
Definition at line 53 of file SparseMatrix.h.
| typedef int sofa::component::linearsolver::SparseMatrix< T >::Index |
Definition at line 51 of file SparseMatrix.h.
| typedef Line::const_iterator sofa::component::linearsolver::SparseMatrix< T >::LElementConstIterator |
Definition at line 55 of file SparseMatrix.h.
| typedef Line::iterator sofa::component::linearsolver::SparseMatrix< T >::LElementIterator |
Definition at line 54 of file SparseMatrix.h.
| typedef std::map<Index,Real> sofa::component::linearsolver::SparseMatrix< T >::Line |
Definition at line 52 of file SparseMatrix.h.
| typedef Data::const_iterator sofa::component::linearsolver::SparseMatrix< T >::LineConstIterator |
Definition at line 57 of file SparseMatrix.h.
| typedef Data::iterator sofa::component::linearsolver::SparseMatrix< T >::LineIterator |
Definition at line 56 of file SparseMatrix.h.
| typedef T sofa::component::linearsolver::SparseMatrix< T >::Real |
Definition at line 50 of file SparseMatrix.h.
| sofa::component::linearsolver::SparseMatrix< T >::SparseMatrix | ( | ) | [inline] |
Definition at line 65 of file SparseMatrix.h.
| sofa::component::linearsolver::SparseMatrix< T >::SparseMatrix | ( | int | nbRow, | |
| int | nbCol | |||
| ) | [inline] |
Definition at line 70 of file SparseMatrix.h.
| void sofa::component::linearsolver::SparseMatrix< 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 149 of file SparseMatrix.h.
| LineConstIterator sofa::component::linearsolver::SparseMatrix< T >::begin | ( | ) | const [inline] |
Definition at line 77 of file SparseMatrix.h.
| LineIterator sofa::component::linearsolver::SparseMatrix< T >::begin | ( | ) | [inline] |
Definition at line 75 of file SparseMatrix.h.
Referenced by sofa::component::linearsolver::SparseMatrix< double >::mul(), and sofa::component::linearsolver::SparseMatrix< double >::mulTranspose().
| void sofa::component::linearsolver::SparseMatrix< T >::clear | ( | ) | [inline, virtual] |
Reset all values to 0.
Implements sofa::defaulttype::BaseMatrix.
Definition at line 241 of file SparseMatrix.h.
| void sofa::component::linearsolver::SparseMatrix< T >::clear | ( | int | i, | |
| int | j | |||
| ) | [inline, virtual] |
| void sofa::component::linearsolver::SparseMatrix< T >::clearCol | ( | int | j | ) | [inline, virtual] |
Reset the value of column j to 0.
Reimplemented from sofa::defaulttype::BaseMatrix.
Definition at line 205 of file SparseMatrix.h.
Referenced by sofa::component::linearsolver::SparseMatrix< double >::clearRowCol().
| void sofa::component::linearsolver::SparseMatrix< T >::clearRow | ( | int | i | ) | [inline, virtual] |
Reset the value of row i to 0.
Reimplemented from sofa::defaulttype::BaseMatrix.
Definition at line 187 of file SparseMatrix.h.
Referenced by sofa::component::linearsolver::SparseMatrix< double >::clearRowCol().
| void sofa::component::linearsolver::SparseMatrix< 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 225 of file SparseMatrix.h.
| int sofa::component::linearsolver::SparseMatrix< T >::colSize | ( | void | ) | const [inline, virtual] |
Number of columns.
Implements sofa::defaulttype::BaseMatrix.
Definition at line 111 of file SparseMatrix.h.
Referenced by sofa::component::linearsolver::SparseMatrix< double >::add(), sofa::component::linearsolver::SparseMatrix< double >::clear(), sofa::component::linearsolver::SparseMatrix< double >::clearCol(), sofa::component::linearsolver::SparseMatrix< double >::clearRow(), sofa::component::linearsolver::SparseMatrix< double >::clearRowCol(), sofa::component::linearsolver::SparseMatrix< double >::element(), sofa::component::linearsolver::SparseMatrix< double >::mulTranspose(), sofa::component::linearsolver::SparseMatrix< double >::resize(), and sofa::component::linearsolver::SparseMatrix< double >::set().
| SReal sofa::component::linearsolver::SparseMatrix< 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 116 of file SparseMatrix.h.
| LineConstIterator sofa::component::linearsolver::SparseMatrix< T >::end | ( | ) | const [inline] |
Definition at line 78 of file SparseMatrix.h.
| LineIterator sofa::component::linearsolver::SparseMatrix< T >::end | ( | ) | [inline] |
Definition at line 76 of file SparseMatrix.h.
Referenced by sofa::component::linearsolver::SparseMatrix< double >::mul(), and sofa::component::linearsolver::SparseMatrix< double >::mulTranspose().
| void sofa::component::linearsolver::SparseMatrix< T >::mul | ( | defaulttype::BaseVector * | res, | |
| const defaulttype::BaseVector * | v | |||
| ) | const [inline] |
Definition at line 318 of file SparseMatrix.h.
| void sofa::component::linearsolver::SparseMatrix< T >::mul | ( | defaulttype::BaseVector * | res, | |
| const FullVector< Real2 > & | v | |||
| ) | const [inline] |
Definition at line 294 of file SparseMatrix.h.
| void sofa::component::linearsolver::SparseMatrix< T >::mul | ( | FullVector< Real2 > & | res, | |
| const defaulttype::BaseVector * | v | |||
| ) | const [inline] |
Definition at line 269 of file SparseMatrix.h.
| void sofa::component::linearsolver::SparseMatrix< T >::mul | ( | FullVector< Real2 > & | res, | |
| const FullVector< Real2 > & | v | |||
| ) | const [inline] |
Definition at line 244 of file SparseMatrix.h.
Referenced by sofa::component::linearsolver::SparseMatrix< double >::operator*().
| void sofa::component::linearsolver::SparseMatrix< T >::mulTranspose | ( | defaulttype::BaseVector * | res, | |
| const defaulttype::BaseVector * | v | |||
| ) | const [inline] |
Definition at line 330 of file SparseMatrix.h.
| void sofa::component::linearsolver::SparseMatrix< T >::mulTranspose | ( | defaulttype::BaseVector * | res, | |
| const FullVector< Real2 > & | v | |||
| ) | const [inline] |
Definition at line 307 of file SparseMatrix.h.
| void sofa::component::linearsolver::SparseMatrix< T >::mulTranspose | ( | FullVector< Real2 > & | res, | |
| const defaulttype::BaseVector * | v | |||
| ) | const [inline] |
Definition at line 282 of file SparseMatrix.h.
| void sofa::component::linearsolver::SparseMatrix< T >::mulTranspose | ( | FullVector< Real2 > & | res, | |
| const FullVector< Real2 > & | v | |||
| ) | const [inline] |
Definition at line 257 of file SparseMatrix.h.
| static const char* sofa::component::linearsolver::SparseMatrix< T >::Name | ( | ) | [inline, static] |
Definition at line 367 of file SparseMatrix.h.
| FullVector<Real2> sofa::component::linearsolver::SparseMatrix< T >::operator* | ( | const FullVector< Real2 > & | v | ) | const [inline] |
Definition at line 342 of file SparseMatrix.h.
| const Line& sofa::component::linearsolver::SparseMatrix< T >::operator[] | ( | Index | i | ) | const [inline] |
Definition at line 85 of file SparseMatrix.h.
| Line& sofa::component::linearsolver::SparseMatrix< T >::operator[] | ( | Index | i | ) | [inline] |
Definition at line 80 of file SparseMatrix.h.
| void sofa::component::linearsolver::SparseMatrix< T >::resize | ( | int | nbRow, | |
| int | nbCol | |||
| ) | [inline, virtual] |
Resize the matrix and reset all values to 0.
Implements sofa::defaulttype::BaseMatrix.
Definition at line 95 of file SparseMatrix.h.
| int sofa::component::linearsolver::SparseMatrix< T >::rowSize | ( | void | ) | const [inline, virtual] |
Number of rows.
Implements sofa::defaulttype::BaseMatrix.
Definition at line 106 of file SparseMatrix.h.
Referenced by sofa::component::linearsolver::SparseMatrix< double >::add(), sofa::component::linearsolver::SparseMatrix< double >::clear(), sofa::component::linearsolver::SparseMatrix< double >::clearCol(), sofa::component::linearsolver::SparseMatrix< double >::clearRow(), sofa::component::linearsolver::SparseMatrix< double >::clearRowCol(), sofa::component::linearsolver::SparseMatrix< double >::element(), sofa::component::linearsolver::SparseMatrix< double >::mul(), sofa::component::linearsolver::SparseMatrix< double >::resize(), and sofa::component::linearsolver::SparseMatrix< double >::set().
| void sofa::component::linearsolver::SparseMatrix< 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 134 of file SparseMatrix.h.
| std::ostream& operator<< | ( | std::ostream & | out, | |
| const SparseMatrix< T > & | v | |||
| ) | [friend] |
Definition at line 349 of file SparseMatrix.h.
Data sofa::component::linearsolver::SparseMatrix< T >::data [protected] |
Definition at line 60 of file SparseMatrix.h.
Referenced by sofa::component::linearsolver::SparseMatrix< double >::add(), sofa::component::linearsolver::SparseMatrix< double >::begin(), sofa::component::linearsolver::SparseMatrix< double >::clear(), sofa::component::linearsolver::SparseMatrix< double >::clearCol(), sofa::component::linearsolver::SparseMatrix< double >::clearRow(), sofa::component::linearsolver::SparseMatrix< double >::element(), sofa::component::linearsolver::SparseMatrix< double >::end(), sofa::component::linearsolver::SparseMatrix< double >::operator[](), sofa::component::linearsolver::SparseMatrix< double >::resize(), and sofa::component::linearsolver::SparseMatrix< double >::set().
Index sofa::component::linearsolver::SparseMatrix< T >::nCol [protected] |
Definition at line 61 of file SparseMatrix.h.
Referenced by sofa::component::linearsolver::SparseMatrix< double >::colSize(), and sofa::component::linearsolver::SparseMatrix< double >::resize().
Index sofa::component::linearsolver::SparseMatrix< T >::nRow [protected] |
Definition at line 61 of file SparseMatrix.h.
Referenced by sofa::component::linearsolver::SparseMatrix< double >::resize(), and sofa::component::linearsolver::SparseMatrix< double >::rowSize().
1.5.7.1