![]() |
QMCPACK
|
An object of this type is a listener expecting a callback to the report function with a vector of values, the convention being 1 per particle, called once per walker per component. More...
Public Types | |
using | ReportingFunction = std::function< void(const int walker_index, const std::string &name, const Vector< T > &values)> |
"Callback" function type for an operator to report a vector of values to a listener More... | |
Public Member Functions | |
ListenerVector (const std::string &name, ReportingFunction report_func) | |
constructor that should appear in the code More... | |
const std::string & | get_name () const |
Public Attributes | |
ReportingFunction | report |
Private Attributes | |
const std::string | name_ |
An object of this type is a listener expecting a callback to the report function with a vector of values, the convention being 1 per particle, called once per walker per component.
The name is primarily for debugging purposes, if have decided against having the QMCHamiltonian use it to estable routing. Instead the register functions in the QMCHamiltonian are specfic to the sort of value that the listener wants to listen to.
Definition at line 38 of file Listener.hpp.
using ReportingFunction = std::function<void(const int walker_index, const std::string& name, const Vector<T>& values)> |
"Callback" function type for an operator to report a vector of values to a listener
[in] | walker_index | a numeric walker id, could be important to listener |
[in] | name | of operator reporting, could be important to listener |
[in] | values | vector of values, per particle by convention. Also by convention the receiver should not assume the reference values have any persistence beyond the scope of the callback. |
Definition at line 49 of file Listener.hpp.
|
inline |
constructor that should appear in the code
[in] | name | intended to be strictly information |
[in] | report_func | intended to be a lambda callback function that will be used to report. |
Definition at line 54 of file Listener.hpp.
|
inline |
|
private |
Definition at line 59 of file Listener.hpp.
Referenced by ListenerVector< T >::get_name().
ReportingFunction report |
Definition at line 55 of file Listener.hpp.
Referenced by SOECPotential::mw_evaluateImpl(), and NonLocalECPotential::mw_evaluateImpl().