ViennaSHE 1.3.0
Free open-source semiconductor device simulator using spherical harmonics expansions techniques.
viennashe::math::sparse_matrix< NumericT > Class Template Reference

Sparse matrix class based on a vector of binary trees for holding the entries. More...

#include <linalg_util.hpp>

Public Types

typedef std::size_t size_type
 
typedef size_type SizeType
 
typedef MapType::iterator iterator2
 
typedef MapType::const_iterator const_iterator2
 
typedef MapType row_type
 
typedef MapType RowType
 

Public Member Functions

 sparse_matrix ()
 
 sparse_matrix (size_type num_rows, size_type num_cols)
 
size_type size1 () const
 
size_type size2 () const
 
NumericT & operator() (size_type i, size_type j)
 Non-const access to the entries of the matrix. Use this for assembly. More...
 
NumericT const & operator() (size_type i, size_type j) const
 
MapType const & row (size_t i) const
 
MapType & row (size_t i)
 
size_type nnz () const
 
self_type trans () const
 
self_type operator* (NumericT factor) const
 
self_typeoperator+= (self_type B)
 

Detailed Description

template<typename NumericT>
class viennashe::math::sparse_matrix< NumericT >

Sparse matrix class based on a vector of binary trees for holding the entries.

Introduced to overcome the scalability issues of ublas::compressed_matrix

Definition at line 68 of file linalg_util.hpp.

Member Typedef Documentation

◆ const_iterator2

template<typename NumericT >
typedef MapType::const_iterator viennashe::math::sparse_matrix< NumericT >::const_iterator2

Definition at line 82 of file linalg_util.hpp.

◆ iterator2

template<typename NumericT >
typedef MapType::iterator viennashe::math::sparse_matrix< NumericT >::iterator2

Definition at line 81 of file linalg_util.hpp.

◆ row_type

template<typename NumericT >
typedef MapType viennashe::math::sparse_matrix< NumericT >::row_type

Definition at line 84 of file linalg_util.hpp.

◆ RowType

template<typename NumericT >
typedef MapType viennashe::math::sparse_matrix< NumericT >::RowType

Definition at line 85 of file linalg_util.hpp.

◆ size_type

template<typename NumericT >
typedef std::size_t viennashe::math::sparse_matrix< NumericT >::size_type

Definition at line 73 of file linalg_util.hpp.

◆ SizeType

template<typename NumericT >
typedef size_type viennashe::math::sparse_matrix< NumericT >::SizeType

Definition at line 74 of file linalg_util.hpp.

Constructor & Destructor Documentation

◆ sparse_matrix() [1/2]

template<typename NumericT >
viennashe::math::sparse_matrix< NumericT >::sparse_matrix ( )
inline

Definition at line 87 of file linalg_util.hpp.

◆ sparse_matrix() [2/2]

template<typename NumericT >
viennashe::math::sparse_matrix< NumericT >::sparse_matrix ( size_type  num_rows,
size_type  num_cols 
)
inline

Definition at line 91 of file linalg_util.hpp.

Member Function Documentation

◆ nnz()

template<typename NumericT >
size_type viennashe::math::sparse_matrix< NumericT >::nnz ( ) const
inline

Definition at line 145 of file linalg_util.hpp.

◆ operator()() [1/2]

template<typename NumericT >
NumericT & viennashe::math::sparse_matrix< NumericT >::operator() ( size_type  i,
size_type  j 
)
inline

Non-const access to the entries of the matrix. Use this for assembly.

Definition at line 112 of file linalg_util.hpp.

◆ operator()() [2/2]

template<typename NumericT >
NumericT const & viennashe::math::sparse_matrix< NumericT >::operator() ( size_type  i,
size_type  j 
) const
inline

Definition at line 121 of file linalg_util.hpp.

◆ operator*()

template<typename NumericT >
self_type viennashe::math::sparse_matrix< NumericT >::operator* ( NumericT  factor) const
inline

Definition at line 168 of file linalg_util.hpp.

◆ operator+=()

template<typename NumericT >
self_type & viennashe::math::sparse_matrix< NumericT >::operator+= ( self_type  B)
inline

Definition at line 181 of file linalg_util.hpp.

◆ row() [1/2]

template<typename NumericT >
MapType & viennashe::math::sparse_matrix< NumericT >::row ( size_t  i)
inline

Definition at line 139 of file linalg_util.hpp.

◆ row() [2/2]

template<typename NumericT >
MapType const & viennashe::math::sparse_matrix< NumericT >::row ( size_t  i) const
inline

Definition at line 134 of file linalg_util.hpp.

◆ size1()

template<typename NumericT >
size_type viennashe::math::sparse_matrix< NumericT >::size1 ( ) const
inline

Definition at line 100 of file linalg_util.hpp.

◆ size2()

template<typename NumericT >
size_type viennashe::math::sparse_matrix< NumericT >::size2 ( ) const
inline

Definition at line 105 of file linalg_util.hpp.

◆ trans()

template<typename NumericT >
self_type viennashe::math::sparse_matrix< NumericT >::trans ( ) const
inline

Definition at line 154 of file linalg_util.hpp.


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