Public Member Functions | |
PointerMatrixVector (const Vector< number > *M=0) | |
PointerMatrixVector (const char *name) | |
PointerMatrixVector (const Vector< number > *M, const char *name) | |
virtual void | clear () |
bool | empty () const |
const PointerMatrixVector & | operator= (const Vector< number > *M) |
virtual void | vmult (Vector< number > &dst, const Vector< number > &src) const |
virtual void | Tvmult (Vector< number > &dst, const Vector< number > &src) const |
virtual void | vmult_add (Vector< number > &dst, const Vector< number > &src) const |
virtual void | Tvmult_add (Vector< number > &dst, const Vector< number > &src) const |
Private Member Functions | |
virtual const void * | get () const |
Private Attributes | |
SmartPointer< const Vector < number > > | m |
Implements a matrix with image dimension 1 by using the scalar product (vmult()) and scalar multiplication (Tvmult()) functions of the Vector class.
PointerMatrixVector< number >::PointerMatrixVector | ( | const Vector< number > * | 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.
PointerMatrixVector< number >::PointerMatrixVector | ( | const char * | name | ) | [inline] |
Constructor. The name argument is used to identify the SmartPointer for this object.
PointerMatrixVector< number >::PointerMatrixVector | ( | const Vector< number > * | 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 PointerMatrixVector< number >::clear | ( | ) | [inline, virtual] |
Reset pointer and release the matrix pointed to.
Implements PointerMatrixBase< Vector< number > >.
References PointerMatrixVector< number >::m.
bool PointerMatrixVector< number >::empty | ( | ) | const [inline] |
Return whether the object is empty.
References PointerMatrixVector< number >::m.
const PointerMatrixVector< number > & PointerMatrixVector< number >::operator= | ( | const Vector< number > * | M | ) | [inline] |
Assign a new matrix pointer. Deletes the old pointer and releases its matrix.
References PointerMatrixVector< number >::m.
void PointerMatrixVector< number >::vmult | ( | Vector< number > & | dst, | |
const Vector< number > & | src | |||
) | const [inline, virtual] |
Matrix-vector product, actually the scalar product of src
and the vector representing this matrix.
The dimension of dst
is 1, while that of src
is the size of the vector representing this matrix.
Implements PointerMatrixBase< Vector< number > >.
References Assert, PointerMatrixVector< number >::m, and Vector< Number >::size().
void PointerMatrixVector< number >::Tvmult | ( | Vector< number > & | dst, | |
const Vector< number > & | src | |||
) | const [inline, virtual] |
Tranposed matrix-vector product, actually the multiplication of the vector representing this matrix with src(0)
.
The dimension of drc
is 1, while that of dst
is the size of the vector representing this matrix.
Implements PointerMatrixBase< Vector< number > >.
References Assert, Vector< Number >::equ(), PointerMatrixVector< number >::m, and Vector< Number >::size().
void PointerMatrixVector< number >::vmult_add | ( | Vector< number > & | dst, | |
const Vector< number > & | src | |||
) | const [inline, virtual] |
Matrix-vector product, adding to dst
.
The dimension of dst
is 1, while that of src
is the size of the vector representing this matrix.
Implements PointerMatrixBase< Vector< number > >.
References Assert, PointerMatrixVector< number >::m, and Vector< Number >::size().
void PointerMatrixVector< number >::Tvmult_add | ( | Vector< number > & | dst, | |
const Vector< number > & | src | |||
) | const [inline, virtual] |
Tranposed matrix-vector product, adding to dst
.
The dimension of src
is 1, while that of dst
is the size of the vector representing this matrix.
Implements PointerMatrixBase< Vector< number > >.
References Vector< Number >::add(), Assert, PointerMatrixVector< number >::m, and Vector< Number >::size().
const void * PointerMatrixVector< number >::get | ( | ) | const [inline, private, virtual] |
Return the address of the matrix for comparison.
Implements PointerMatrixBase< Vector< number > >.
References PointerMatrixVector< number >::m.
SmartPointer<const Vector<number> > PointerMatrixVector< number >::m [private] |
The pointer to the actual matrix.
Referenced by PointerMatrixVector< number >::clear(), PointerMatrixVector< number >::empty(), PointerMatrixVector< number >::get(), PointerMatrixVector< number >::operator=(), PointerMatrixVector< number >::Tvmult(), PointerMatrixVector< number >::Tvmult_add(), PointerMatrixVector< number >::vmult(), and PointerMatrixVector< number >::vmult_add().