Public Member Functions | |
PointerMatrixAux (VectorMemory< VECTOR > *mem=0, const MATRIX *M=0) | |
PointerMatrixAux (VectorMemory< VECTOR > *mem, const char *name) | |
PointerMatrixAux (VectorMemory< VECTOR > *mem, const MATRIX *M, const char *name) | |
virtual void | clear () |
bool | empty () const |
void | set_memory (VectorMemory< VECTOR > *mem) |
const PointerMatrixAux & | 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 | |
GrowingVectorMemory< VECTOR > | my_memory |
SmartPointer< VectorMemory < VECTOR > > | mem |
SmartPointer< const MATRIX > | m |
Related Functions | |
(Note that these are not member functions.) | |
template<class VECTOR , class MATRIX > | |
PointerMatrixBase< VECTOR > * | new_pointer_matrix_base (MATRIX &matrix, const VECTOR &, const char *name="PointerMatrixAux") |
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.
This class differs form PointerMatrix by its additional VectorMemory object and by the fact that it implements the functions vmult_add() and Tvmult_add() only using vmult() and Tvmult() of the MATRIX.
PointerMatrixAux< MATRIX, VECTOR >::PointerMatrixAux | ( | VectorMemory< VECTOR > * | mem = 0 , |
|
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 PointerMatrixAux.
If M
is zero, no matrix is stored.
If mem
is zero, then GrowingVectorMemory is used.
References PointerMatrixAux< MATRIX, VECTOR >::my_memory.
PointerMatrixAux< MATRIX, VECTOR >::PointerMatrixAux | ( | VectorMemory< VECTOR > * | mem, | |
const char * | name | |||
) | [inline] |
Constructor not using a matrix. The name argument is used to identify the SmartPointer for this object.
References PointerMatrixAux< MATRIX, VECTOR >::my_memory.
PointerMatrixAux< MATRIX, VECTOR >::PointerMatrixAux | ( | VectorMemory< VECTOR > * | mem, | |
const MATRIX * | M, | |||
const char * | name | |||
) | [inline] |
Constructor. M
points to a matrix which must live longer than the PointerMatrixAux. The name argument is used to identify the SmartPointer for this object.
References PointerMatrixAux< MATRIX, VECTOR >::my_memory.
void PointerMatrixAux< MATRIX, VECTOR >::clear | ( | ) | [inline, virtual] |
Reset pointer and release the matrix pointed to.
Implements PointerMatrixBase< VECTOR >.
References PointerMatrixAux< MATRIX, VECTOR >::m.
bool PointerMatrixAux< MATRIX, VECTOR >::empty | ( | ) | const [inline] |
Return whether the object is empty.
References PointerMatrixAux< MATRIX, VECTOR >::m.
void PointerMatrixAux< MATRIX, VECTOR >::set_memory | ( | VectorMemory< VECTOR > * | mem | ) | [inline] |
Assign a new VectorMemory object for getting auxiliary vectors.
References PointerMatrixAux< MATRIX, VECTOR >::mem, and PointerMatrixAux< MATRIX, VECTOR >::my_memory.
const PointerMatrixAux< MATRIX, VECTOR > & PointerMatrixAux< MATRIX, VECTOR >::operator= | ( | const MATRIX * | M | ) | [inline] |
Assign a new matrix pointer. Deletes the old pointer and releases its matrix.
References PointerMatrixAux< MATRIX, VECTOR >::m.
void PointerMatrixAux< MATRIX, VECTOR >::vmult | ( | VECTOR & | dst, | |
const VECTOR & | src | |||
) | const [inline, virtual] |
Matrix-vector product.
Implements PointerMatrixBase< VECTOR >.
References Assert, PointerMatrixAux< MATRIX, VECTOR >::m, PointerMatrixAux< MATRIX, VECTOR >::mem, and PointerMatrixAux< MATRIX, VECTOR >::my_memory.
void PointerMatrixAux< MATRIX, VECTOR >::Tvmult | ( | VECTOR & | dst, | |
const VECTOR & | src | |||
) | const [inline, virtual] |
Tranposed matrix-vector product.
Implements PointerMatrixBase< VECTOR >.
References Assert, PointerMatrixAux< MATRIX, VECTOR >::m, PointerMatrixAux< MATRIX, VECTOR >::mem, and PointerMatrixAux< MATRIX, VECTOR >::my_memory.
void PointerMatrixAux< MATRIX, VECTOR >::vmult_add | ( | VECTOR & | dst, | |
const VECTOR & | src | |||
) | const [inline, virtual] |
Matrix-vector product, adding to dst
.
Implements PointerMatrixBase< VECTOR >.
References Assert, PointerMatrixAux< MATRIX, VECTOR >::m, PointerMatrixAux< MATRIX, VECTOR >::mem, and PointerMatrixAux< MATRIX, VECTOR >::my_memory.
void PointerMatrixAux< MATRIX, VECTOR >::Tvmult_add | ( | VECTOR & | dst, | |
const VECTOR & | src | |||
) | const [inline, virtual] |
Tranposed matrix-vector product, adding to dst
.
Implements PointerMatrixBase< VECTOR >.
References Assert, PointerMatrixAux< MATRIX, VECTOR >::m, PointerMatrixAux< MATRIX, VECTOR >::mem, and PointerMatrixAux< MATRIX, VECTOR >::my_memory.
const void * PointerMatrixAux< MATRIX, VECTOR >::get | ( | ) | const [inline, private, virtual] |
Return the address of the matrix for comparison.
Implements PointerMatrixBase< VECTOR >.
References PointerMatrixAux< MATRIX, VECTOR >::m.
GrowingVectorMemory<VECTOR> PointerMatrixAux< MATRIX, VECTOR >::my_memory [mutable, private] |
The backup memory if none was provided.
Referenced by PointerMatrixAux< MATRIX, VECTOR >::PointerMatrixAux(), PointerMatrixAux< MATRIX, VECTOR >::set_memory(), PointerMatrixAux< MATRIX, VECTOR >::Tvmult(), PointerMatrixAux< MATRIX, VECTOR >::Tvmult_add(), PointerMatrixAux< MATRIX, VECTOR >::vmult(), and PointerMatrixAux< MATRIX, VECTOR >::vmult_add().
SmartPointer<VectorMemory<VECTOR> > PointerMatrixAux< MATRIX, VECTOR >::mem [mutable, private] |
Object for getting the auxiliary vector.
Referenced by PointerMatrixAux< MATRIX, VECTOR >::set_memory(), PointerMatrixAux< MATRIX, VECTOR >::Tvmult(), PointerMatrixAux< MATRIX, VECTOR >::Tvmult_add(), PointerMatrixAux< MATRIX, VECTOR >::vmult(), and PointerMatrixAux< MATRIX, VECTOR >::vmult_add().
SmartPointer<const MATRIX> PointerMatrixAux< MATRIX, VECTOR >::m [private] |
The pointer to the actual matrix.
Referenced by PointerMatrixAux< MATRIX, VECTOR >::clear(), PointerMatrixAux< MATRIX, VECTOR >::empty(), PointerMatrixAux< MATRIX, VECTOR >::get(), PointerMatrixAux< MATRIX, VECTOR >::operator=(), PointerMatrixAux< MATRIX, VECTOR >::Tvmult(), PointerMatrixAux< MATRIX, VECTOR >::Tvmult_add(), PointerMatrixAux< MATRIX, VECTOR >::vmult(), and PointerMatrixAux< MATRIX, VECTOR >::vmult_add().