ppap4lmp
0.7.2
|
Trampoline class to bind Element class to Python. More...
#include <py_element.h>
Public Member Functions | |
ElPtr | get_element (const Json &name) override |
Get this object as a shared pointer of Element class. More... | |
ShPtr< Generator > | get_generator (const Json &name) override |
Get this object as a shared pointer of Generator class. More... | |
void | accessed_by_instance_of (const Str &classname) override |
Set class name of an instance calling Element::check_required_keys. More... | |
Element () | |
Constructor of Element class. More... | |
![]() | |
Element () | |
Constructor of Element class. More... | |
ShPtr< Element > | append_updater (const ShPtr< Updater > &upd) |
Append an Updater object to this Element object: the only way to extend an updating process associated with this object. More... | |
const Json & | get_data () |
Get a reference to data of this object. More... | |
Set< Str > | get_keys () |
Get keys of the data of this object. More... | |
Json | make_reduced_data (const Json &key_) |
Get reduced data of this object. More... | |
template<typename T > | |
void | make_1darray_from_data (T &array, const Str &key) |
Extract values of a property in data as a one-dimensional Eigen-Array. More... | |
template<typename T > | |
void | make_2darray_from_data (T &array, const Vec< Str > &keys) |
Extract values of properties in data as a two-dimensional Eigen-Array. More... | |
void | update_keys () |
Update datakeys. This method must be called after setting new properties to data. More... | |
void | check_required_keys (const Json &key_) |
Check if this object has required key(s). More... | |
bool | check_optional_keys (const Json &key_) |
Check if this object has optional key(s). More... | |
const Json & | get_data_py () |
Get a reference to data of this object. More... | |
Set< Str > | get_keys_py () |
Get keys of the data of this object. More... | |
ArrayXi | get_1d_int_py (const Str &key) |
Get integer values stored in Element::data of this object as a one-dimensional Numpy-Array. More... | |
ArrayXd | get_1d_float_py (const Str &key) |
Get float values stored in Element::data of this object as a one-dimensional Numpy-Array. More... | |
ArrayXXi | get_2d_int_py (const py::args &args) |
Get integer values stored in Element::data of this object as a two-dimensional Numpy-Array. More... | |
ArrayXXd | get_2d_float_py (const py::args &args) |
Get float values stored in Element::data of this object as a two-dimensional Numpy-Array. More... | |
![]() | |
void | book_to_generate_data () |
Appoint to this Generator object. More... | |
void | generate_data () |
Hello to this Generator object. More... | |
void | finish_using_generated_data () |
Goodbye to this object. More... | |
const Vec< UpdatePair > & | get_update_chain () |
Get update_chain of this object. More... | |
Additional Inherited Members | |
![]() | |
void | merge_update_chain (const Vec< UpdatePair > &new_chain) |
![]() | |
Vec< UpdatePair > | update_chain |
Trampoline class to bind Element class to Python.
For more details, please see pybind11 documentation: https://pybind11.readthedocs.io/en/stable/advanced/classes.html.
Definition at line 20 of file py_element.h.
|
inlineoverridevirtual |
Set class name of an instance calling Element::check_required_keys.
classname | A string to be assigned to Element::accessing_classname. |
Reimplemented from Element.
Definition at line 35 of file py_element.h.
Element::Element |
Constructor of Element class.
This constructor is thread-unsafe because it accesses its members thread-globally. Ensure this constructor is not called in a multithreading context.
Definition at line 22 of file element.cpp.