geomc 1.0
A c++ linear algebra template library
Public Types | Public Member Functions | Static Public Attributes | List of all members
MatrixHandle< T > Class Template Referenceabstract

A generic matrix class which can hold references to all other matrix types. More...

#include <geomc/linalg/mtxtypes/MatrixHandle.h>

Inheritance diagram for MatrixHandle< T >:
WriteableMatrixBase< T, DYNAMIC_DIM, DYNAMIC_DIM, MatrixHandle< T > > MatrixBase< T, M, N, Derived >

Public Types

typedef detail::_ImplMtxReftype< MatrixHandle< T >, T >::reference reference
 
typedef MtxSubsetIterator< MatrixHandle< T >, derived_referenceiterator
 Writeable row-major iterator.
 
typedef iterator region_iterator
 Writeable row-major region iterator.
 
typedef MtxRowIterator< MatrixHandle< T >, derived_referencerow_iterator
 Writeable iterator over row elements.
 
typedef MtxColIterator< MatrixHandle< T >, derived_referencecol_iterator
 Writeable iterator over column elements.
 
typedef T elem_t
 Element type.
 
typedef MtxSubsetIterator< const Derived, const elem_tconst_iterator
 Read-only row-major iterator over matrix elements.
 
typedef const_iterator const_region_iterator
 Read-only row-major iterator over the matrix elements in a rectangular region.
 
typedef MtxRowIterator< const Derived, const elem_tconst_row_iterator
 Read-only iterator over the elments of a row.
 
typedef MtxColIterator< const Derived, const elem_tconst_col_iterator
 Read-only iterator over the elements of a column.
 
typedef Storage< storage_token_t, _ImplStorageObjCount< Derived >::count > storagebuffer_t
 
typedef Derived recurring_t
 

Public Member Functions

virtual index_t rows () const =0
 
virtual index_t cols () const =0
 
virtual T operator() (index_t r, index_t c) const =0
 
virtual reference set (index_t r, index_t c, T val)=0
 
virtual void set_identity ()=0
 
virtual void set_zero ()=0
 
virtual void get_storage_tokens (storage_token_t *buf) const =0
 
virtual index_t storage_token_count () const =0
 
derived_row_iterator operator[] (index_t i)
 
derived_const_row_iterator operator[] (index_t i) const
 
row_iterator row (index_t i)
 
const_row_iterator row (index_t i) const
 
col_iterator col (index_t i)
 
const_col_iterator col (index_t i) const
 
derived_reference operator() (index_t row, index_t col)
 
iterator begin ()
 
const_iterator begin () const
 
iterator end ()
 
const_iterator end () const
 
region_iterator region_begin (const MatrixRegion &r)
 
const_region_iterator region_begin (const MatrixRegion &r) const
 
region_iterator region_end (const MatrixRegion &r)
 
const_region_iterator region_end (const MatrixRegion &r) const
 
storagebuffer_t get_storage_token_buffer () const
 

Static Public Attributes

static constexpr index_t ROWDIM = M
 Row dimension template parameter.
 
static constexpr index_t COLDIM = N
 Column dimension template parameter.
 

Detailed Description

template<typename T>
class geom::MatrixHandle< T >

A generic matrix class which can hold references to all other matrix types.

Member Function Documentation

◆ begin() [1/2]

iterator begin ( )
inlineinherited
Returns
A writeable, random-access, row-major iterator over the elements of this matrix, pointing to the element at (0,0).

◆ begin() [2/2]

const_iterator begin ( ) const
inlineinherited
Returns
A read-only random-access row major-ordered iterator over the elements of this matrix, pointing to the element at (0,0).

◆ col() [1/2]

col_iterator col ( index_t  i)
inlineinherited
Parameters
iIndex of column (zero-indexed)
Returns
A writeable iterator over the elements of column i.

◆ col() [2/2]

const_col_iterator col ( index_t  i) const
inlineinherited
Parameters
iIndex of column (zero-indexed)
Returns
A const iterator over the elements of column i

◆ end() [1/2]

iterator end ( )
inlineinherited
Returns
A writeable, random-access, row-major iterator over the elements of this matrix, pointing to the element just beyond the last element in the lower right corner.

◆ end() [2/2]

const_iterator end ( ) const
inlineinherited
Returns
A read-only random-access row major-ordered iterator over the elements of this matrix, pointing to the element just beyond the last element in the lower right corner.

◆ operator()()

derived_reference operator() ( index_t  row,
index_t  col 
)
inlineinherited

Get the element at (row, col).

Parameters
rowZero-indexed row coordinate
colZero-indexed column coordinate
Returns
A reference to the element at (row, col)

◆ operator[]() [1/2]

derived_row_iterator operator[] ( index_t  i)
inlineinherited
Parameters
iIndex of row (zero-indexed)
Returns
A writeable iterator over the elements of row i.

◆ operator[]() [2/2]

derived_const_row_iterator operator[] ( index_t  i) const
inlineinherited
Parameters
iIndex of row (zero-indexed)
Returns
A const iterator over the elements of row i

◆ region_begin() [1/2]

region_iterator region_begin ( const MatrixRegion r)
inlineinherited
Parameters
rThe zero-indexed region to iterate over. The upper extreme coordinates represent the index just beyond the last element to be iterated over.
Returns
A writeable, random-access, row-major iterator over the elements in region r, pointing at the first element in the region (upper left corner).

◆ region_begin() [2/2]

const_region_iterator region_begin ( const MatrixRegion r) const
inlineinherited
Parameters
rThe zero-indexed region to iterate over. The upper extreme coordinates represent the index just beyond the last element to be iterated over.
Returns
A read-only, random-access, row-major iterator over the elements in region r, pointing at the first element in the region (upper left corner).

◆ region_end() [1/2]

region_iterator region_end ( const MatrixRegion r)
inlineinherited
Parameters
rThe zero-indexed region to iterate over. The upper extreme coordinates represent the index just beyond the last element to be iterated over.
Returns
A writeable, random-access, row-major iterator over the elements in region r, pointing at the element just beyond the last element in the region.

◆ region_end() [2/2]

const_region_iterator region_end ( const MatrixRegion r) const
inlineinherited
Parameters
rThe zero-indexed region to iterate over. The upper extreme coordinates represent the index just beyond the last element to be iterated over.
Returns
A read-only, random-access, row-major iterator over the elements in region r, pointing at the element just beyond the last element in the region.

◆ row() [1/2]

row_iterator row ( index_t  i)
inlineinherited
Parameters
iIndex of row (zero-indexed)
Returns
A writeable iterator over the elements of row i.

◆ row() [2/2]

const_row_iterator row ( index_t  i) const
inlineinherited
Parameters
iIndex of row (zero-indexed)
Returns
A const iterator over the elements of row i

The documentation for this class was generated from the following files: