23 #include <boost/python.hpp>
135 Property(std::shared_ptr<cadabra::Ex> obj, std::shared_ptr<cadabra::Ex> params=0);
138 std::string
str_()
const;
141 std::string
latex_()
const;
144 std::string
repr_()
const;
cadabra::Kernel * create_scope_from_global()
Definition: PythonCdb.cc:822
Basic storage class for symbolic mathemematical expressions.
Definition: Storage.hh:130
std::string Ex_to_Sympy_string(const cadabra::Ex &)
Similar to Ex_to_Sympy, but only producing a string which can be parsed by Sympy, instead of a full-f...
Definition: PythonCdb.cc:343
cadabra::Ex operator+(const cadabra::Ex &ex1, const cadabra::Ex &ex2)
Add two expressions, adding a top-level node if required.
Definition: PythonCdb.cc:536
bool __eq__Ex_Ex(const cadabra::Ex &, const cadabra::Ex &)
Comparison operator for Ex objects in Python.
Definition: PythonCdb.cc:433
T * prop
Definition: PythonCdb.hh:155
cadabra::Kernel * create_empty_scope()
Definition: PythonCdb.cc:829
cadabra::Kernel * create_scope()
Setup of kernels in current scope, callable from Python.
Definition: PythonCdb.cc:815
cadabra::Ex operator-(const cadabra::Ex &ex1, const cadabra::Ex &ex2)
Subtract two expressions, adding a top-level node if required.
Definition: PythonCdb.cc:572
std::string Ex_latex_(const cadabra::Ex &)
The Python 'print' function always calls the 'str' member on objects to be printed.
Definition: PythonCdb.cc:327
std::string Ex_str_(const cadabra::Ex &)
Generate the Python str() and repr() representation of the Ex object.
Definition: PythonCdb.cc:299
cadabra::Kernel * get_kernel_from_scope()
Get a pointer to the currently visible kernel.
Definition: PythonCdb.cc:766
std::string str_() const
Human-readable form in text, i.e. no special formatting.
Definition: PythonCdb.cc:915
void call_post_process(cadabra::Kernel &, cadabra::Ex &ex)
Run the post-process Python function (if defined) on the given expression.
Definition: PythonCdb.cc:1007
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:390
boost::python::object Ex_to_Sympy(const cadabra::Ex &)
Outputs a Cadabra 'Ex' as a Sympy expression.
Definition: PythonCdb.cc:359
Helper class to ensure that all Python property objects derive from the same base class...
Definition: PythonCdb.hh:103
Property(std::shared_ptr< cadabra::Ex > obj, std::shared_ptr< cadabra::Ex > params=0)
Definition: PythonCdb.cc:905
std::string repr_() const
Python-parseable form. FIXME: not correct right now.
Definition: PythonCdb.cc:952
Property is a templated wrapper around a C++ property object.
Definition: PythonCdb.hh:133
std::shared_ptr< cadabra::Ex > for_obj
Definition: PythonCdb.hh:160
std::string latex_() const
Human-readable form using LaTeX markup.
Definition: PythonCdb.cc:925
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:835
std::string Ex_repr_(const cadabra::Ex &)
Definition: PythonCdb.cc:335
bool __eq__Ex_int(const cadabra::Ex &, int)
Comparison operator for Ex objects in Python.
Definition: PythonCdb.cc:438