List of all members |
Classes |
Public Types |
Public Member Functions |
Protected Member Functions |
Friends
mpqc::StringToSortedVector< String, Value, Compare, Equal, HashMap > Class Template Reference
Documentation
template<typename String, typename Value, typename Compare, typename Equal, template< typename... > class HashMap>
class mpqc::StringToSortedVector< String, Value, Compare, Equal, HashMap >
A (sparse) set of Slater determinants represented as a sparse matrix.
Implemented as a hashtable indexed by alpha strings, with the corresponding element containing sorted vector (by beta string hash) of determinants and their ordinal values. This
Classes | |
struct | Iterator |
iterator is a proxy to a FString object, stores an ordinal More... | |
Public Types | |
using | row_type = boost::container::small_vector< Value, 8 > |
using | col_const_iterator = typename row_type::const_iterator |
using | container_type = HashMap< String, row_type, string::hash< String >, string::equal_to< String > > |
using | row_const_iterator = typename container_type::const_iterator |
using | const_iterator = Iterator |
Public Member Functions | |
StringToSortedVector ()=default | |
StringToSortedVector (const StringToSortedVector &)=default | |
StringToSortedVector (StringToSortedVector &&) noexcept=default | |
StringToSortedVector & | operator= (const StringToSortedVector &)=default |
StringToSortedVector & | operator= (StringToSortedVector &&) noexcept=default |
~StringToSortedVector ()=default | |
auto | size () const |
bool | contains (const String &str) const |
const auto & | row (const String &str) const |
const auto * | row_ptr (const String &str) const |
std::pair< col_const_iterator, bool > | insert (const String &astr, const Value &v) |
auto & | finalize () |
template<typename F > | |
auto & | finalize (F &&f) |
bool | is_finalized () const |
Iterator accessors | |
| |
const_iterator | begin () const |
const_iterator | end () const |
const_iterator | cbegin () const |
const_iterator | cend () const |
Protected Member Functions | |
const auto & | data () const |
auto & | data () |
Friends | |
struct | Iterator |
Member Typedef Documentation
◆ col_const_iterator
template<typename String , typename Value , typename Compare , typename Equal , template< typename... > class HashMap>
using mpqc::StringToSortedVector< String, Value, Compare, Equal, HashMap >::col_const_iterator = typename row_type::const_iterator |
◆ const_iterator
template<typename String , typename Value , typename Compare , typename Equal , template< typename... > class HashMap>
using mpqc::StringToSortedVector< String, Value, Compare, Equal, HashMap >::const_iterator = Iterator |
◆ container_type
template<typename String , typename Value , typename Compare , typename Equal , template< typename... > class HashMap>
using mpqc::StringToSortedVector< String, Value, Compare, Equal, HashMap >::container_type = HashMap<String, row_type, string::hash<String>, string::equal_to<String> > |
◆ row_const_iterator
template<typename String , typename Value , typename Compare , typename Equal , template< typename... > class HashMap>
using mpqc::StringToSortedVector< String, Value, Compare, Equal, HashMap >::row_const_iterator = typename container_type::const_iterator |
◆ row_type
template<typename String , typename Value , typename Compare , typename Equal , template< typename... > class HashMap>
using mpqc::StringToSortedVector< String, Value, Compare, Equal, HashMap >::row_type = boost::container::small_vector<Value, 8> |
Constructor & Destructor Documentation
◆ StringToSortedVector() [1/3]
template<typename String , typename Value , typename Compare , typename Equal , template< typename... > class HashMap>
|
default |
◆ StringToSortedVector() [2/3]
template<typename String , typename Value , typename Compare , typename Equal , template< typename... > class HashMap>
|
default |
◆ StringToSortedVector() [3/3]
template<typename String , typename Value , typename Compare , typename Equal , template< typename... > class HashMap>
|
defaultnoexcept |
◆ ~StringToSortedVector()
template<typename String , typename Value , typename Compare , typename Equal , template< typename... > class HashMap>
|
default |
Member Function Documentation
◆ begin()
template<typename String , typename Value , typename Compare , typename Equal , template< typename... > class HashMap>
|
inline |
◆ cbegin()
template<typename String , typename Value , typename Compare , typename Equal , template< typename... > class HashMap>
|
inline |
◆ cend()
template<typename String , typename Value , typename Compare , typename Equal , template< typename... > class HashMap>
|
inline |
◆ contains()
template<typename String , typename Value , typename Compare , typename Equal , template< typename... > class HashMap>
|
inline |
- Returns
- true if contains the given string
◆ data() [1/2]
template<typename String , typename Value , typename Compare , typename Equal , template< typename... > class HashMap>
|
inlineprotected |
◆ data() [2/2]
template<typename String , typename Value , typename Compare , typename Equal , template< typename... > class HashMap>
|
inlineprotected |
◆ end()
template<typename String , typename Value , typename Compare , typename Equal , template< typename... > class HashMap>
|
inline |
◆ finalize() [1/2]
template<typename String , typename Value , typename Compare , typename Equal , template< typename... > class HashMap>
|
inline |
finalizes the matrix by sorting the rows; this object cannot be mutated henceforth
◆ finalize() [2/2]
template<typename String , typename Value , typename Compare , typename Equal , template< typename... > class HashMap>
template<typename F >
|
inline |
finalizes the matrix by sorting the rows and applying callable F
- Template Parameters
-
F callable with signature void(StringToSortedVector&)
- Note
- this object cannot be mutated henceforth
◆ insert()
template<typename String , typename Value , typename Compare , typename Equal , template< typename... > class HashMap>
|
inline |
try inserting determinant defined by 2 strings, with optionally-specified ordinal value
- Parameters
-
[in] astr spin-up string [in] bstr spin-down string [in] ord ordinal value to assign to this determinant; if not given use this->size()
- Returns
- std::pair containing the iterator to the found or inserted determinant and the flag indicating whether insertion took place
◆ is_finalized()
template<typename String , typename Value , typename Compare , typename Equal , template< typename... > class HashMap>
|
inline |
- Returns
- whether this object has been finalized
- See also
- finalize()
◆ operator=() [1/2]
template<typename String , typename Value , typename Compare , typename Equal , template< typename... > class HashMap>
|
default |
◆ operator=() [2/2]
template<typename String , typename Value , typename Compare , typename Equal , template< typename... > class HashMap>
|
defaultnoexcept |
◆ row()
template<typename String , typename Value , typename Compare , typename Equal , template< typename... > class HashMap>
|
inline |
- Returns
- the row of values contained for
str
◆ row_ptr()
template<typename String , typename Value , typename Compare , typename Equal , template< typename... > class HashMap>
|
inline |
- Returns
- ptr to the row of values contained for
str
; nullptr ifstr
is not contained in the set
◆ size()
template<typename String , typename Value , typename Compare , typename Equal , template< typename... > class HashMap>
|
inline |
- Returns
- the total number of determinants
Friends And Related Function Documentation
◆ Iterator
template<typename String , typename Value , typename Compare , typename Equal , template< typename... > class HashMap>
|
friend |
The documentation for this class was generated from the following files: