mpqc::FermionStringSparseSet< FString, HashMap > Class Template Reference
Documentation
template<typename FString, template< typename... > class HashMap>
class mpqc::FermionStringSparseSet< FString, HashMap >
hashmap-based container of strings
- Note
- finding strings is fast
Public Types | |
using | ordinal_type = std::int64_t |
typedef HashMap< FString, ordinal_type, std::hash< FString > > | container_type |
typedef container_type::iterator | iterator |
typedef container_type::const_iterator | const_iterator |
typedef FString | value_type |
Public Member Functions | |
FermionStringSparseSet () | |
FermionStringSparseSet (const FermionStringSparseSet &)=default | |
FermionStringSparseSet (FermionStringSparseSet &&)=default | |
FermionStringSparseSet & | operator= (const FermionStringSparseSet &)=default |
FermionStringSparseSet & | operator= (FermionStringSparseSet &&)=default |
~FermionStringSparseSet ()=default | |
const_iterator | insert (const FString &s) |
const_iterator | insert (FString &&s) |
const_iterator | begin () const |
const_iterator | end () const |
const_iterator | cbegin () const |
const_iterator | cend () const |
const_iterator | find (const FString &str) const |
std::optional< const_iterator > | safe_find (const FString &str) const |
std::tuple< ordinal_type, bool > | find_or_insert (const FString &str) |
bool | contains (const FString &str) const |
size_t | size () const |
size_t | bucket_count () const |
Member Typedef Documentation
◆ const_iterator
template<typename FString , template< typename... > class HashMap>
typedef container_type::const_iterator mpqc::FermionStringSparseSet< FString, HashMap >::const_iterator |
◆ container_type
template<typename FString , template< typename... > class HashMap>
typedef HashMap<FString, ordinal_type, std::hash<FString> > mpqc::FermionStringSparseSet< FString, HashMap >::container_type |
◆ iterator
template<typename FString , template< typename... > class HashMap>
typedef container_type::iterator mpqc::FermionStringSparseSet< FString, HashMap >::iterator |
◆ ordinal_type
template<typename FString , template< typename... > class HashMap>
using mpqc::FermionStringSparseSet< FString, HashMap >::ordinal_type = std::int64_t |
◆ value_type
template<typename FString , template< typename... > class HashMap>
typedef FString mpqc::FermionStringSparseSet< FString, HashMap >::value_type |
Constructor & Destructor Documentation
◆ FermionStringSparseSet() [1/3]
template<typename FString , template< typename... > class HashMap>
|
inline |
◆ FermionStringSparseSet() [2/3]
template<typename FString , template< typename... > class HashMap>
|
default |
◆ FermionStringSparseSet() [3/3]
template<typename FString , template< typename... > class HashMap>
|
default |
◆ ~FermionStringSparseSet()
template<typename FString , template< typename... > class HashMap>
|
default |
Member Function Documentation
◆ begin()
template<typename FString , template< typename... > class HashMap>
|
inline |
◆ bucket_count()
template<typename FString , template< typename... > class HashMap>
|
inline |
- Returns
- the number of buckets holding the strings
◆ cbegin()
template<typename FString , template< typename... > class HashMap>
|
inline |
◆ cend()
template<typename FString , template< typename... > class HashMap>
|
inline |
◆ contains()
template<typename FString , template< typename... > class HashMap>
|
inline |
◆ end()
template<typename FString , template< typename... > class HashMap>
|
inline |
◆ find()
template<typename FString , template< typename... > class HashMap>
|
inline |
◆ find_or_insert()
template<typename FString , template< typename... > class HashMap>
|
inline |
Looks for the string, and inserts it if not found
- Parameters
-
[in] str string
- Returns
{ordinal
,inserted} whereis
the ordinal index andinserted
is true if the string was inserted
◆ insert() [1/2]
template<typename FString , template< typename... > class HashMap>
|
inline |
- Parameters
-
[in] s a nonnull string to be inserted into this
- Note
- asserts that
s.size()
matches that of the first string in this, if any -
asserts that
s
does not have equivalent already inserted
◆ insert() [2/2]
template<typename FString , template< typename... > class HashMap>
|
inline |
- Parameters
-
[in] s a nonnull string to be inserted into this
- Note
- asserts that
s.size()
matches that of the first string in this, if any -
asserts that
s
does not have equivalent already inserted
◆ operator=() [1/2]
template<typename FString , template< typename... > class HashMap>
|
default |
◆ operator=() [2/2]
template<typename FString , template< typename... > class HashMap>
|
default |
◆ safe_find()
template<typename FString , template< typename... > class HashMap>
|
inline |
◆ size()
template<typename FString , template< typename... > class HashMap>
|
inline |
- Returns
- the number of strings in the set
The documentation for this class was generated from the following files: