Public Member Functions | |
PointerMatrix (const MATRIX *M=0) | |
PointerMatrix (const char *name) | |
PointerMatrix (const MATRIX *M, const char *name) | |
virtual void | clear () |
bool | empty () const |
const PointerMatrix & | operator= (const MATRIX *M) |
virtual void | vmult (VECTOR &dst, const VECTOR &src) const |
virtual void | Tvmult (VECTOR &dst, const VECTOR &src) const |
virtual void | vmult_add (VECTOR &dst, const VECTOR &src) const |
virtual void | Tvmult_add (VECTOR &dst, const VECTOR &src) const |
Private Member Functions | |
virtual const void * | get () const |
Private Attributes | |
SmartPointer< const MATRIX > | m |
Related Functions | |
(Note that these are not member functions.) | |
template<typename numberv > | |
PointerMatrixBase< Vector < numberv > > * | new_pointer_matrix_base (const IdentityMatrix &matrix, const Vector< numberv > &, const char *name="PointerMatrix") |
template<typename numberv , typename numberm > | |
PointerMatrixBase< Vector < numberv > > * | new_pointer_matrix_base (const FullMatrix< numberm > &matrix, const Vector< numberv > &, const char *name="PointerMatrix") |
template<typename numberv , typename numberm > | |
PointerMatrixBase< Vector < numberv > > * | new_pointer_matrix_base (const LAPACKFullMatrix< numberm > &matrix, const Vector< numberv > &, const char *name="PointerMatrix") |
template<typename numberv , typename numberm > | |
PointerMatrixBase< Vector < numberv > > * | new_pointer_matrix_base (const SparseMatrix< numberm > &matrix, const Vector< numberv > &, const char *name="PointerMatrix") |
template<class VECTOR , typename numberm > | |
PointerMatrixBase< VECTOR > * | new_pointer_matrix_base (const BlockSparseMatrix< numberm > &matrix, const VECTOR &, const char *name="PointerMatrix") |
template<typename numberv , typename numberm > | |
PointerMatrixBase< Vector < numberv > > * | new_pointer_matrix_base (const SparseMatrixEZ< numberm > &matrix, const Vector< numberv > &, const char *name="PointerMatrix") |
template<class VECTOR , typename numberm > | |
PointerMatrixBase< VECTOR > * | new_pointer_matrix_base (const BlockSparseMatrixEZ< numberm > &matrix, const VECTOR &, const char *name="PointerMatrix") |
template<typename numberv , typename numberm > | |
PointerMatrixBase< BlockVector < numberv > > * | new_pointer_matrix_base (const BlockMatrixArray< numberm > &matrix, const BlockVector< numberv > &, const char *name="PointerMatrix") |
template<typename numberv , typename numberm > | |
PointerMatrixBase< Vector < numberv > > * | new_pointer_matrix_base (const TridiagonalMatrix< numberm > &matrix, const Vector< numberv > &, const char *name="PointerMatrix") |
A pointer to be used as a matrix. This class stores a pointer to a matrix and can be used as a matrix itself in iterative methods.
The main purpose for the existence of this class is its base class, which only has a vector as template argument. Therefore, this interface provides an abstract base class for matrices.
PointerMatrix< MATRIX, VECTOR >::PointerMatrix | ( | const MATRIX * | M = 0 |
) | [inline] |
Constructor. The pointer in the argument is stored in this class. As usual, the lifetime of *M
must be longer than the one of the PointerMatrix.
If M
is zero, no matrix is stored.
PointerMatrix< MATRIX, VECTOR >::PointerMatrix | ( | const char * | name | ) | [inline] |
Constructor. The name argument is used to identify the SmartPointer for this object.
PointerMatrix< MATRIX, VECTOR >::PointerMatrix | ( | const MATRIX * | M, | |
const char * | name | |||
) | [inline] |
Constructor. M
points to a matrix which must live longer than the PointerMatrix. The name argument is used to identify the SmartPointer for this object.
void PointerMatrix< MATRIX, VECTOR >::clear | ( | ) | [inline, virtual] |
Reset pointer and release the matrix pointed to.
Implements PointerMatrixBase< VECTOR >.
References PointerMatrix< MATRIX, VECTOR >::m.
bool PointerMatrix< MATRIX, VECTOR >::empty | ( | ) | const [inline] |
Return whether the object is empty.
References PointerMatrix< MATRIX, VECTOR >::m.
const PointerMatrix< MATRIX, VECTOR > & PointerMatrix< MATRIX, VECTOR >::operator= | ( | const MATRIX * | M | ) | [inline] |
Assign a new matrix pointer. Deletes the old pointer and releases its matrix.
References PointerMatrix< MATRIX, VECTOR >::m.
void PointerMatrix< MATRIX, VECTOR >::vmult | ( | VECTOR & | dst, | |
const VECTOR & | src | |||
) | const [inline, virtual] |
Matrix-vector product.
Implements PointerMatrixBase< VECTOR >.
References Assert, and PointerMatrix< MATRIX, VECTOR >::m.
void PointerMatrix< MATRIX, VECTOR >::Tvmult | ( | VECTOR & | dst, | |
const VECTOR & | src | |||
) | const [inline, virtual] |
Tranposed matrix-vector product.
Implements PointerMatrixBase< VECTOR >.
References Assert, and PointerMatrix< MATRIX, VECTOR >::m.
void PointerMatrix< MATRIX, VECTOR >::vmult_add | ( | VECTOR & | dst, | |
const VECTOR & | src | |||
) | const [inline, virtual] |
Matrix-vector product, adding to dst
.
Implements PointerMatrixBase< VECTOR >.
References Assert, and PointerMatrix< MATRIX, VECTOR >::m.
void PointerMatrix< MATRIX, VECTOR >::Tvmult_add | ( | VECTOR & | dst, | |
const VECTOR & | src | |||
) | const [inline, virtual] |
Tranposed matrix-vector product, adding to dst
.
Implements PointerMatrixBase< VECTOR >.
References Assert, and PointerMatrix< MATRIX, VECTOR >::m.
const void * PointerMatrix< MATRIX, VECTOR >::get | ( | ) | const [inline, private, virtual] |
Return the address of the matrix for comparison.
Implements PointerMatrixBase< VECTOR >.
References PointerMatrix< MATRIX, VECTOR >::m.
SmartPointer<const MATRIX> PointerMatrix< MATRIX, VECTOR >::m [private] |
The pointer to the actual matrix.
Referenced by PointerMatrix< MATRIX, VECTOR >::clear(), PointerMatrix< MATRIX, VECTOR >::empty(), PointerMatrix< MATRIX, VECTOR >::get(), PointerMatrix< MATRIX, VECTOR >::operator=(), PointerMatrix< MATRIX, VECTOR >::Tvmult(), PointerMatrix< MATRIX, VECTOR >::Tvmult_add(), PointerMatrix< MATRIX, VECTOR >::vmult(), and PointerMatrix< MATRIX, VECTOR >::vmult_add().