Tomographer
v5.4
Tomographer C++ Framework Documentation
|
C++ utility to convert a Python dictionary of fields into a valid C++ MHWalkerParams object. More...
#include <py/cxx/tomographerpy/pymhrw.h>
Static Public Member Functions | |
static py::dict | makeDict (const MHWalkerParams &) |
static MHWalkerParams | fromPyObj (py::object) |
C++ utility to convert a Python dictionary of fields into a valid C++ MHWalkerParams object.
Different MHWalker Interface may require different types of parameters. In C++, this is a template parameter which is passed on to whoever cares about those parameters. In python, the parameters are stored simply as an aribtrary dictionary of parameter values.
Specialize this template class to each C++ MHWalkerParams type so that it can be easily converted to/from a Python dictionary. In the conversion from Python, we actually allow the user to specify any object; this allows us to handle the case where they directly specify the step-size as a float instead of the explicit dictionary {'step_size': ...}
.