|
pomerol 2.2
|
A list of terms contributing to the Lehmann representation of a correlation function. More...
#include <TermList.hpp>
Public Member Functions | |
| TermList (Hash const &hasher, KeyEqual const &key_equal, IsNegligible const &is_negligible) | |
| void | add_term (TermType const &term) |
| std::size_t | size () const |
| Number of terms in the container. | |
| void | clear () |
| Remove all terms from the container. | |
| std::unordered_set< TermType, Hash, KeyEqual > const & | as_set () const |
| Access the underlying set of terms. | |
| IsNegligible const & | get_is_negligible () const |
| Access the 'is negligible' predicate. | |
| template<typename... Args> | |
| ComplexType | operator() (Args &&... args) const |
| void | broadcast (MPI_Comm const &comm, int root) |
| bool | check_terms () const |
| Check if all terms in the container are not negligible. | |
A list of terms contributing to the Lehmann representation of a correlation function.
A set-like container storing a list of terms contributing to the Lehmann representation of a correlation function.
The terms must support hashing using a function TermType::Hash and a similarity check via TermType::KeyEqual. Similar terms are automatically collected and reduced to one term using operator+=(). A term T is considered negligible and is automatically removed from the container if TermType::IsNegligible(T, current_number_of_terms + 1) evaluates to true.
| TermType | Type of a single term. |
Definition at line 41 of file TermList.hpp.
|
inline |
Constructor.
| [in] | hasher | Hasher for the underlying std::unordered_set object. |
| [in] | key_equal | KeyEqual predicate for the underlying std::unordered_set object. |
| [in] | is_negligible | Predicate that determines whether a term can be neglected. |
Definition at line 60 of file TermList.hpp.
|
inline |
Add a new term to the container
| [in] | term | Term to be added |
Definition at line 65 of file TermList.hpp.
|
inline |
Access the underlying set of terms.
Definition at line 85 of file TermList.hpp.
|
inline |
Broadcast terms from a root MPI rank to all other ranks in a communicator.
| [in] | comm | The MPI communicator for the broadcast operation. |
| [in] | root | Rank of the root MPI process. |
Definition at line 106 of file TermList.hpp.
|
inline |
Check if all terms in the container are not negligible.
Definition at line 130 of file TermList.hpp.
|
inline |
Remove all terms from the container.
Definition at line 82 of file TermList.hpp.
|
inline |
Access the 'is negligible' predicate.
Definition at line 88 of file TermList.hpp.
|
inline |
Forward arguments to TermType:operator() of each term in the container and return a sum of their return values.
| Args | Types of the arguments. |
| [in] | args | Arguments to be passes to the terms. |
Definition at line 94 of file TermList.hpp.
|
inline |
Number of terms in the container.
Definition at line 79 of file TermList.hpp.