This archetype gives the common interface for matrices that have direct representations. The matrices are required to provide iterators to access and manipulate their entries, but not any matrix-matrix or matrix-vector arithmetic. That is, they are pure containers. As such, they are only parameterized on the element type, not on the field type.
|
Row of columns iterator |
The row of columns iterator traverses the columns of the matrix in ascending order. Dereferencing the iterator yields a column vector in dense format
|
typedef Col | Column |
typedef ConstCol | ConstColumn |
ColIterator | colBegin () |
ColIterator | colEnd () |
ConstColIterator | colBegin () const |
ConstColIterator | colEnd () const |
Raw Indexed iterator |
Like the raw iterator, the indexed iterator is a method for accessing all entries in the matrix in some unspecified order. At each position of the the indexed iterator, it also provides the row and column indices of the currently referenced entry. This is provided through it's rowIndex() and colIndex() functions.
|
typedef const RawIndexedIterator | ConstRawIndexedIterator |
RawIndexedIterator | rawIndexedBegin () |
RawIndexedIterator | rawIndexedEnd () |
ConstRawIndexedIterator | rawIndexedBegin () const |
ConstRawIndexedIterator | rawIndexedEnd () const |
Row | operator[] (size_t i) |
ConstRow | operator[] (size_t i) const |
Public Member Functions |
| MatrixArchetype () |
| MatrixArchetype (size_t m, size_t n) |
| MatrixArchetype (const MatrixArchetype &M) |
MatrixArchetype & | operator= (const MatrixArchetype &M) |
size_t | rowdim () const |
size_t | coldim () const |
void | resize (size_t m, size_t n) |
| Resize the matrix to the given dimensions.
|
|
template<class Field> std::istream & | read (std::istream &file, const Field &F) |
template<class Field> std::ostream & | write (std::ostream &os, const Field &F) const |
|
void | setEntry (size_t i, size_t j, const Element &a_ij) |
Element & | refEntry (size_t i, size_t j) |
const Element & | getEntry (size_t i, size_t j) const |
Element & | getEntry (Element &x, size_t i, size_t j) const |
|
The column of rows iterator traverses the rows of the matrix in ascending order. Dereferencing the iterator yields a row vector in dense format
|
RowIterator | rowBegin () |
RowIterator | rowEnd () |
ConstRowIterator | rowBegin () const |
ConstRowIterator | rowEnd () const |
|
The raw iterator is a method for accessing all entries in the matrix in some unspecified order. This can be used, e.g. to reduce all matrix entries modulo a prime before passing the matrix into an algorithm.
|
RawIterator | rawBegin () |
RawIterator | rawEnd () |
ConstRawIterator | rawBegin () const |
ConstRawIterator | rawEnd () const |
|
template<class Vector> Vector & | columnDensity (Vector &v) const |
MatrixArchetype & | transpose (MatrixArchetype &M) const |