ug4
SparseMatrix< T > Class Template Reference

#include <sparsematrix_interface.h>

Public Types

typedef T value_type
 

Public Member Functions

row_iterator begin_row (size_t row)
 
const_row_iterator begin_row (size_t row) const
 
void defragment ()
 
row_iterator end_row (size_t row)
 
const_row_iterator end_row (size_t row) const
 
row_iterator get_connection (size_t r, size_t c)
 
const_row_iterator get_connection (size_t r, size_t c) const
 
row_iterator get_connection (size_t r, size_t c, bool &bFound)
 
const_row_iterator get_connection (size_t r, size_t c, bool &bFound) const
 
size_t num_cols () const
 
size_t num_connections (size_t row) const
 
size_t num_rows () const
 
value_typeoperator() (size_t r, size_t c)
 
const value_typeoperator() (size_t r, size_t c) const
 
bool resize (size_t newRows, size_t newCols)
 
 SparseMatrix ()
 
size_t total_num_connections () const
 
virtual ~SparseMatrix ()
 

Member Typedef Documentation

◆ value_type

template<typename T >
typedef T SparseMatrix< T >::value_type

Constructor & Destructor Documentation

◆ SparseMatrix()

template<typename T >
SparseMatrix< T >::SparseMatrix ( )

◆ ~SparseMatrix()

template<typename T >
virtual SparseMatrix< T >::~SparseMatrix ( )
virtual

Member Function Documentation

◆ begin_row() [1/2]

template<typename T >
row_iterator SparseMatrix< T >::begin_row ( size_t  row)

◆ begin_row() [2/2]

template<typename T >
const_row_iterator SparseMatrix< T >::begin_row ( size_t  row) const

◆ defragment()

template<typename T >
void SparseMatrix< T >::defragment ( )

◆ end_row() [1/2]

template<typename T >
row_iterator SparseMatrix< T >::end_row ( size_t  row)

◆ end_row() [2/2]

template<typename T >
const_row_iterator SparseMatrix< T >::end_row ( size_t  row) const

◆ get_connection() [1/4]

template<typename T >
row_iterator SparseMatrix< T >::get_connection ( size_t  r,
size_t  c 
)

◆ get_connection() [2/4]

template<typename T >
const_row_iterator SparseMatrix< T >::get_connection ( size_t  r,
size_t  c 
) const

◆ get_connection() [3/4]

template<typename T >
row_iterator SparseMatrix< T >::get_connection ( size_t  r,
size_t  c,
bool &  bFound 
)

◆ get_connection() [4/4]

template<typename T >
const_row_iterator SparseMatrix< T >::get_connection ( size_t  r,
size_t  c,
bool &  bFound 
) const

◆ num_cols()

template<typename T >
size_t SparseMatrix< T >::num_cols ( ) const
inline

◆ num_connections()

template<typename T >
size_t SparseMatrix< T >::num_connections ( size_t  row) const
inline

◆ num_rows()

template<typename T >
size_t SparseMatrix< T >::num_rows ( ) const
inline

◆ operator()() [1/2]

template<typename T >
value_type& SparseMatrix< T >::operator() ( size_t  r,
size_t  c 
)

operator() (size_t r, size_t c) const access connection (r, c)

Parameters
rrow
ccolumn
Note
it is assert'ed that connection (r,c) is there use operator()(r,c,bConnectionFound) to check.
Returns
SparseMat(r, c)

◆ operator()() [2/2]

template<typename T >
const value_type& SparseMatrix< T >::operator() ( size_t  r,
size_t  c 
) const

operator() (size_t r, size_t c) const access or create connection (r, c)

Parameters
rrow
ccolumn
Note
(r,c) is added to sparsity pattern if not already there use operator()(r,c,bConnectionFound) to prevent
Returns
SparseMat(r, c)=0.0 if connection created, otherwise SparseMat(r, c)

◆ resize()

template<typename T >
bool SparseMatrix< T >::resize ( size_t  newRows,
size_t  newCols 
)

◆ total_num_connections()

template<typename T >
size_t SparseMatrix< T >::total_num_connections ( ) const
inline

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