#include <chomp/struct/flatmatr.h>
Public Member Functions | |
flatMatrix (int size) | |
The only allowed constructor. | |
row | operator[] (int i) |
Returns a row of the matrix. | |
const_row | operator[] (int i) const |
Returns a constant row of the matrix. | |
Protected Attributes | |
int | n |
The size of the matrix. | |
std::vector< element > | tab |
The array of elements. | |
Classes | |
class | const_row |
The class that represents a constant single row of the matrix. More... | |
class | row |
The class that represents a single row of the matrix. More... |
Additional classes for a row and a constant row are defined within this class which allow to use the usual double indexing to get to the entries of the matrix, both for reading only and for modifying the entries, e.g., M[0][1].
Definition at line 56 of file flatmatr.h.
chomp::homology::flatMatrix< element >::flatMatrix | ( | int | size | ) | [inline] |
The only allowed constructor.
The size of the matrix (the number of rows and collumns) must be given at initialization.
Definition at line 62 of file flatmatr.h.
row chomp::homology::flatMatrix< element >::operator[] | ( | int | i | ) | [inline] |
Returns a row of the matrix.
Definition at line 89 of file flatmatr.h.
References chomp::homology::flatMatrix< element >::n, and chomp::homology::flatMatrix< element >::tab.
const_row chomp::homology::flatMatrix< element >::operator[] | ( | int | i | ) | const [inline] |
Returns a constant row of the matrix.
Definition at line 114 of file flatmatr.h.
References chomp::homology::flatMatrix< element >::n, and chomp::homology::flatMatrix< element >::tab.
int chomp::homology::flatMatrix< element >::n [protected] |
The size of the matrix.
Definition at line 119 of file flatmatr.h.
Referenced by chomp::homology::flatMatrix< element >::operator[]().
std::vector<element> chomp::homology::flatMatrix< element >::tab [protected] |
The array of elements.
Definition at line 122 of file flatmatr.h.
Referenced by chomp::homology::flatMatrix< element >::operator[]().