CAPD RedHom Library
data_structures::SparseMatrix< IndexType, ScalarType > Class Template Reference

#include <capd/redAlg/data_structures/sparse_matrix.h>

Public Types

typedef HashMap< IndexType, ScalarType, Hasher< IndexType > > Row
 
typedef HashMap< IndexType, ScalarType, Hasher< IndexType > > Column
 
typedef DirectMap< IndexType, Row, Hasher< IndexType > > Rows
 
typedef DirectMap< IndexType, Column, Hasher< IndexType > > Columns
 
typedef Rows::const_iterator RowsIterator
 
typedef Row::const_iterator RowIterator
 
typedef Columns::const_iterator ColumnsIterator
 
typedef Column::const_iterator ColumnIterator
 

Public Member Functions

 SparseMatrix ()
 
 SparseMatrix (const SparseMatrix &other)
 
 SparseMatrix (int row_count, int col_count)
 
void resize (int r, int c)
 
ScalarType get (const IndexType &r, const IndexType &c) const
 
const Rowsrows () const
 
const Columnscols () const
 
const Rowrow (const IndexType &r)
 
const Columncol (const IndexType &c)
 
void set (const IndexType &r, const IndexType &c, const ScalarType &value)
 
void set_non_existing (const IndexType &r, const IndexType &c, const ScalarType &value)
 
void delete_row (const IndexType &r)
 
void delete_col (const IndexType &c)
 
void swap (SparseMatrix &other)
 

Member Typedef Documentation

template<typename IndexType, typename ScalarType>
typedef HashMap<IndexType, ScalarType, Hasher<IndexType> > data_structures::SparseMatrix< IndexType, ScalarType >::Column
template<typename IndexType, typename ScalarType>
typedef Column::const_iterator data_structures::SparseMatrix< IndexType, ScalarType >::ColumnIterator
template<typename IndexType, typename ScalarType>
typedef DirectMap<IndexType, Column, Hasher<IndexType> > data_structures::SparseMatrix< IndexType, ScalarType >::Columns
template<typename IndexType, typename ScalarType>
typedef Columns::const_iterator data_structures::SparseMatrix< IndexType, ScalarType >::ColumnsIterator
template<typename IndexType, typename ScalarType>
typedef HashMap<IndexType, ScalarType, Hasher<IndexType> > data_structures::SparseMatrix< IndexType, ScalarType >::Row
template<typename IndexType, typename ScalarType>
typedef Row::const_iterator data_structures::SparseMatrix< IndexType, ScalarType >::RowIterator
template<typename IndexType, typename ScalarType>
typedef DirectMap<IndexType, Row, Hasher<IndexType> > data_structures::SparseMatrix< IndexType, ScalarType >::Rows
template<typename IndexType, typename ScalarType>
typedef Rows::const_iterator data_structures::SparseMatrix< IndexType, ScalarType >::RowsIterator

Constructor & Destructor Documentation

template<typename IndexType, typename ScalarType>
data_structures::SparseMatrix< IndexType, ScalarType >::SparseMatrix ( )
inline
template<typename IndexType, typename ScalarType>
data_structures::SparseMatrix< IndexType, ScalarType >::SparseMatrix ( const SparseMatrix< IndexType, ScalarType > &  other)
inline
template<typename IndexType, typename ScalarType>
data_structures::SparseMatrix< IndexType, ScalarType >::SparseMatrix ( int  row_count,
int  col_count 
)
inline

Member Function Documentation

template<typename IndexType, typename ScalarType>
const Column& data_structures::SparseMatrix< IndexType, ScalarType >::col ( const IndexType &  c)
inline
template<typename IndexType, typename ScalarType>
const Columns& data_structures::SparseMatrix< IndexType, ScalarType >::cols ( ) const
inline
template<typename IndexType, typename ScalarType>
void data_structures::SparseMatrix< IndexType, ScalarType >::delete_col ( const IndexType &  c)
inline
template<typename IndexType, typename ScalarType>
void data_structures::SparseMatrix< IndexType, ScalarType >::delete_row ( const IndexType &  r)
inline
template<typename IndexType, typename ScalarType>
ScalarType data_structures::SparseMatrix< IndexType, ScalarType >::get ( const IndexType &  r,
const IndexType &  c 
) const
inline
template<typename IndexType, typename ScalarType>
void data_structures::SparseMatrix< IndexType, ScalarType >::resize ( int  r,
int  c 
)
inline
template<typename IndexType, typename ScalarType>
const Row& data_structures::SparseMatrix< IndexType, ScalarType >::row ( const IndexType &  r)
inline
template<typename IndexType, typename ScalarType>
const Rows& data_structures::SparseMatrix< IndexType, ScalarType >::rows ( ) const
inline
template<typename IndexType, typename ScalarType>
void data_structures::SparseMatrix< IndexType, ScalarType >::set ( const IndexType &  r,
const IndexType &  c,
const ScalarType value 
)
inline
template<typename IndexType, typename ScalarType>
void data_structures::SparseMatrix< IndexType, ScalarType >::set_non_existing ( const IndexType &  r,
const IndexType &  c,
const ScalarType value 
)
inline
template<typename IndexType, typename ScalarType>
void data_structures::SparseMatrix< IndexType, ScalarType >::swap ( SparseMatrix< IndexType, ScalarType > &  other)
inline