mpqc::UCSRMatrix< T > Class Template Reference

Documentation

template<typename T>
class mpqc::UCSRMatrix< T >

CSR-format matrix with unsorted rows

Note
designed to be efficient for matrices with nonzero elements in every row

Public Types

using value_type = T
 
using row_type = TA::container::svector< std::pair< std::size_t, T > >
 
using base_type = TA::container::svector< row_type >
 

Public Member Functions

 UCSRMatrix () noexcept=default
 
 UCSRMatrix (const UCSRMatrix &)=default
 
 UCSRMatrix (UCSRMatrix &&)=default
 
UCSRMatrixoperator= (const UCSRMatrix &)=default
 
UCSRMatrixoperator= (UCSRMatrix &&)=default
 
 ~UCSRMatrix ()=default
 
 UCSRMatrix (std::size_t r, std::size_t c)
 make a matrix with r rows and c columns More...
 
std::size_t rows () const
 
std::size_t cols () const
 
const row_typerow (std::size_t r) const
 get a const reference to row r More...
 
row_typerow (std::size_t r)
 get a reference to row r More...
 
bool exists (std::size_t r, std::size_t c) const
 
const value_typeoperator() (std::size_t r, std::size_t c) const
 
value_typeoperator() (std::size_t r, std::size_t c)
 
template<bool Lower = false, typename DenseVector >
std::vector< DenseVector > vlmul (const std::vector< DenseVector > &vecs) const
 

Member Typedef Documentation

◆ base_type

template<typename T >
using mpqc::UCSRMatrix< T >::base_type = TA::container::svector<row_type>

◆ row_type

template<typename T >
using mpqc::UCSRMatrix< T >::row_type = TA::container::svector<std::pair<std::size_t, T> >

◆ value_type

template<typename T >
using mpqc::UCSRMatrix< T >::value_type = T

Constructor & Destructor Documentation

◆ UCSRMatrix() [1/4]

template<typename T >
mpqc::UCSRMatrix< T >::UCSRMatrix ( )
defaultnoexcept

◆ UCSRMatrix() [2/4]

template<typename T >
mpqc::UCSRMatrix< T >::UCSRMatrix ( const UCSRMatrix< T > &  )
default

◆ UCSRMatrix() [3/4]

template<typename T >
mpqc::UCSRMatrix< T >::UCSRMatrix ( UCSRMatrix< T > &&  )
default

◆ ~UCSRMatrix()

template<typename T >
mpqc::UCSRMatrix< T >::~UCSRMatrix ( )
default

◆ UCSRMatrix() [4/4]

template<typename T >
mpqc::UCSRMatrix< T >::UCSRMatrix ( std::size_t  r,
std::size_t  c 
)
inline

make a matrix with r rows and c columns

Member Function Documentation

◆ cols()

template<typename T >
std::size_t mpqc::UCSRMatrix< T >::cols ( ) const
inline
Returns
the number of rows

◆ exists()

template<typename T >
bool mpqc::UCSRMatrix< T >::exists ( std::size_t  r,
std::size_t  c 
) const
inline
Returns
true if there exists an element in row r and column c

◆ operator()() [1/2]

template<typename T >
value_type& mpqc::UCSRMatrix< T >::operator() ( std::size_t  r,
std::size_t  c 
)
inline
Returns
const reference to the element in row r and column c
Note
asserts that element exists

◆ operator()() [2/2]

template<typename T >
const value_type& mpqc::UCSRMatrix< T >::operator() ( std::size_t  r,
std::size_t  c 
) const
inline
Returns
const reference to the element in row r and column c
Note
asserts that element exists

◆ operator=() [1/2]

template<typename T >
UCSRMatrix& mpqc::UCSRMatrix< T >::operator= ( const UCSRMatrix< T > &  )
default

◆ operator=() [2/2]

template<typename T >
UCSRMatrix& mpqc::UCSRMatrix< T >::operator= ( UCSRMatrix< T > &&  )
default

◆ row() [1/2]

template<typename T >
row_type& mpqc::UCSRMatrix< T >::row ( std::size_t  r)
inline

get a reference to row r

◆ row() [2/2]

template<typename T >
const row_type& mpqc::UCSRMatrix< T >::row ( std::size_t  r) const
inline

get a const reference to row r

◆ rows()

template<typename T >
std::size_t mpqc::UCSRMatrix< T >::rows ( ) const
inline
Returns
the number of rows

◆ vlmul()

template<typename T >
template<bool Lower = false, typename DenseVector >
std::vector<DenseVector> mpqc::UCSRMatrix< T >::vlmul ( const std::vector< DenseVector > &  vecs) const
inline

left-multiplies a panel of n vectors c by this matrix: c.transpose()

  • (*this)
    Template Parameters
    Lowerif true, this matrix only contains (permuted) lower triangle of a symmetric matrix


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