23 #include <boost/python.hpp> 130 Property(std::shared_ptr<cadabra::Ex> obj, std::shared_ptr<cadabra::Ex> params=0);
133 std::string str_()
const;
136 std::string latex_()
const;
139 std::string repr_()
const;
cadabra::Kernel * create_scope_from_global()
Definition: PythonCdb.cc:780
Basic storage class for symbolic mathemematical expressions.
Definition: Storage.hh:130
cadabra::Ex operator+(const cadabra::Ex &ex1, const cadabra::Ex &ex2)
Add two expressions, adding a top-level node if required.
Definition: PythonCdb.cc:494
bool __eq__Ex_Ex(const cadabra::Ex &, const cadabra::Ex &)
Comparison operator for Ex objects in Python.
Definition: PythonCdb.cc:391
T * prop
Definition: PythonCdb.hh:150
cadabra::Kernel * create_empty_scope()
Definition: PythonCdb.cc:787
cadabra::Kernel * create_scope()
Setup of kernels in current scope, callable from Python.
Definition: PythonCdb.cc:773
cadabra::Ex operator-(const cadabra::Ex &ex1, const cadabra::Ex &ex2)
Subtract two expressions, adding a top-level node if required.
Definition: PythonCdb.cc:530
std::string Ex_latex_(const cadabra::Ex &)
The Python 'print' function always calls the 'str' member on objects to be printed.
Definition: PythonCdb.cc:308
std::string Ex_str_(const cadabra::Ex &)
Generate the Python str() and repr() representation of the Ex object.
Definition: PythonCdb.cc:294
cadabra::Kernel * get_kernel_from_scope()
Get a pointer to the currently visible kernel.
Definition: PythonCdb.cc:724
void call_post_process(cadabra::Kernel &, cadabra::Ex &ex)
Run the post-process Python function (if defined) on the given expression.
Definition: PythonCdb.cc:957
std::shared_ptr< cadabra::Ex > fetch_from_python(const std::string &nm)
Fetch an Ex object from the Python side using its Python identifier.
Definition: PythonCdb.cc:348
boost::python::object Ex_to_Sympy(const cadabra::Ex &)
Convert a Cadabra 'Ex' to a Sympy expression.
Definition: PythonCdb.cc:324
Helper class to ensure that all Python property objects derive from the same base class...
Definition: PythonCdb.hh:98
Property is a templated wrapper around a C++ property object.
Definition: PythonCdb.hh:128
std::shared_ptr< cadabra::Ex > for_obj
Definition: PythonCdb.hh:155
void inject_defaults(cadabra::Kernel *)
Inject properties directly into the Kernel, even if the kernel is not yet on the Python stack (needed...
Definition: PythonCdb.cc:793
std::string Ex_repr_(const cadabra::Ex &)
Definition: PythonCdb.cc:316
bool __eq__Ex_int(const cadabra::Ex &, int)
Comparison operator for Ex objects in Python.
Definition: PythonCdb.cc:396