mpqc::SlaterDeterminantSparseMatrix< String, Spin > Struct Template Reference

Documentation

template<typename String, SpinCase1 Spin>
struct mpqc::SlaterDeterminantSparseMatrix< String, Spin >

Slater determinant set as a sparse matrix (hashtable of alpha strings, with all beta strings in the row)

Public Types

using base_type = StringToSortedVector< String, std::pair< SlaterDeterminant< String >, std::int64_t >, utility::sdhashcompare< String, flip(Spin)>, utility::sdequal< String, flip(Spin)> >
 
using ordinal_type = std::int64_t
 
using col_const_iterator = typename base_type::col_const_iterator
 

Public Member Functions

auto & base ()
 
const auto & base () const
 
bool contains (const String &astr, const String &bstr) const
 
std::optional< col_const_iteratorsafe_find (const String &astr, const String &bstr) const
 
auto insert (const String &astr, const String &bstr, std::int64_t ord=-1)
 
auto to_string_set (SpinCase1 spin) const
 extracts the list of strings of case spin More...
 
auto transpose () const
 transpose More...
 
void recompute_ordinals (ordinal_type start=0)
 recomputes ordinals More...
 
bool operator== (const SlaterDeterminantSparseMatrix &other) const
 

Static Public Member Functions

static constexpr SpinCase1 spincase ()
 

Member Typedef Documentation

◆ base_type

template<typename String , SpinCase1 Spin>
using mpqc::SlaterDeterminantSparseMatrix< String, Spin >::base_type = StringToSortedVector<String, std::pair<SlaterDeterminant<String>, std::int64_t>, utility::sdhashcompare<String, flip(Spin)>, utility::sdequal<String, flip(Spin)> >

◆ col_const_iterator

template<typename String , SpinCase1 Spin>
using mpqc::SlaterDeterminantSparseMatrix< String, Spin >::col_const_iterator = typename base_type::col_const_iterator

◆ ordinal_type

template<typename String , SpinCase1 Spin>
using mpqc::SlaterDeterminantSparseMatrix< String, Spin >::ordinal_type = std::int64_t

Member Function Documentation

◆ base() [1/2]

template<typename String , SpinCase1 Spin>
auto& mpqc::SlaterDeterminantSparseMatrix< String, Spin >::base ( )
inline

◆ base() [2/2]

template<typename String , SpinCase1 Spin>
const auto& mpqc::SlaterDeterminantSparseMatrix< String, Spin >::base ( ) const
inline

◆ contains()

template<typename String , SpinCase1 Spin>
bool mpqc::SlaterDeterminantSparseMatrix< String, Spin >::contains ( const String &  astr,
const String &  bstr 
) const
inline
Returns
true if contains a determinant corresponding to astr and bstr

◆ insert()

template<typename String , SpinCase1 Spin>
auto mpqc::SlaterDeterminantSparseMatrix< String, Spin >::insert ( const String &  astr,
const String &  bstr,
std::int64_t  ord = -1 
)
inline

try inserting SlaterDeterminant(astr,bstr)

Parameters
[in]ordthe ordinal to use for the
Returns
std::pair containing iterator to the existing or newly inserted SD and bool flag indicating whether insertion took place

◆ operator==()

template<typename String , SpinCase1 Spin>
bool mpqc::SlaterDeterminantSparseMatrix< String, Spin >::operator== ( const SlaterDeterminantSparseMatrix< String, Spin > &  other) const
inline

comparison operator returns true if *this and other contain same set of determinants, potentially in different order

◆ recompute_ordinals()

template<typename String , SpinCase1 Spin>
void mpqc::SlaterDeterminantSparseMatrix< String, Spin >::recompute_ordinals ( ordinal_type  start = 0)
inline

recomputes ordinals

◆ safe_find()

template<typename String , SpinCase1 Spin>
std::optional<col_const_iterator> mpqc::SlaterDeterminantSparseMatrix< String, Spin >::safe_find ( const String &  astr,
const String &  bstr 
) const
inline
Returns
iterator pointing to the determinant corresponding to astr and bstr, if any

◆ spincase()

template<typename String , SpinCase1 Spin>
static constexpr SpinCase1 mpqc::SlaterDeterminantSparseMatrix< String, Spin >::spincase ( )
inlinestaticconstexpr

◆ to_string_set()

template<typename String , SpinCase1 Spin>
auto mpqc::SlaterDeterminantSparseMatrix< String, Spin >::to_string_set ( SpinCase1  spin) const
inline

extracts the list of strings of case spin

◆ transpose()

template<typename String , SpinCase1 Spin>
auto mpqc::SlaterDeterminantSparseMatrix< String, Spin >::transpose ( ) const
inline

transpose


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