chomp::homology::flatMatrix< element > Class Template Reference

This class defines a simple data structure for a flat 2-dim square matrix whose entries are stored in a single array. More...

#include <chomp/struct/flatmatr.h>

List of all members.

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...


Detailed Description

template<class element>
class chomp::homology::flatMatrix< element >

This class defines a simple data structure for a flat 2-dim square matrix whose entries are stored in a single array.

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.


Constructor & Destructor Documentation

template<class element>
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.


Member Function Documentation

template<class element>
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.

template<class element>
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.


Member Data Documentation

template<class element>
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[]().

template<class element>
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[]().


The documentation for this class was generated from the following file:
Generated on Wed Nov 21 11:08:42 2007 for The Uniform Expansion Software by  doxygen 1.5.3