5 #include "../Storage.hh"
6 #include "../ExNode.hh"
9 using Ex_ptr = std::shared_ptr<Ex>;
105 #ifdef MATHEMATICA_FOUND
ExNode is a combination of an Ex::iterator and an interface which we can use to manipulate the data p...
Definition: ExNode.hh:29
Basic storage class for symbolic mathemematical expressions.
Definition: Storage.hh:142
Ex_ptr Ex_add(const Ex_ptr ex1, const ExNode ex2)
Add two expressions, adding a top-level \sum node if required.
Definition: py_ex.cc:49
std::string Ex_as_str(Ex_ptr ex)
Generate the Python str() and repr() representation of the Ex object.
Definition: py_ex.cc:247
Ex_ptr Ex_mul(const Ex_ptr ex1, const Ex_ptr ex2)
Multiply two expressions, adding a top-level \prod node if required.
Definition: py_ex.cc:155
Ex_ptr Ex_sub(const Ex_ptr ex1, const ExNode ex2)
Subtract two expressions, adding a top-level \sum node if required.
Definition: py_ex.cc:176
Ex_ptr fetch_from_python(const std::string &nm)
Fetch an Ex object from the Python side using its Python identifier.
Definition: py_ex.cc:212
bool Ex_compare(Ex_ptr one, Ex_ptr other)
Comparison operator for Ex objects in Python.
Definition: py_ex.cc:38
std::string Ex_as_latex(Ex_ptr ex)
The Python 'print' function always calls the 'str' member on objects to be printed.
Definition: py_ex.cc:272
pybind11::object Ex_as_sympy(Ex_ptr ex)
Outputs a Cadabra 'Ex' as a Sympy expression.
Definition: py_ex.cc:282
Functions to handle the exchange properties of two or more symbols in a product.
Definition: Adjform.cc:83
Ex_ptr map_sympy_wrapper(Ex_ptr ex, std::string head, pybind11::args args)
Definition: py_ex.cc:604
void Ex_setitem(Ex_ptr ex, int index, Ex val)
Definition: py_ex.cc:429
void Ex_setitem_iterator(Ex_ptr ex, ExNode en, Ex_ptr val)
Definition: py_ex.cc:440
size_t Ex_len(Ex_ptr ex)
Definition: py_ex.cc:466
Ex Ex_getitem(Ex &ex, int index)
Definition: py_ex.cc:412
std::string Ex_head(Ex_ptr ex)
Definition: py_ex.cc:478
std::string Ex_as_sympy_string(Ex_ptr ex)
Similar to Ex_to_Sympy, but only producing a string which can be parsed by Sympy, instead of a full-f...
Definition: py_ex.cc:297
void init_ex(py::module &m)
Definition: py_ex.cc:612
std::string Ex_as_MMA(Ex_ptr ex, bool use_unicode)
Definition: py_ex.cc:328
std::string Ex_as_tree(Ex *ex)
Ex_ptr Ex_from_int(int num, bool)
Definition: py_ex.cc:561
void call_post_process(Kernel &kernel, Ex_ptr ex)
Definition: py_ex.cc:567
std::string Ex_as_repr(Ex_ptr ex)
Definition: py_ex.cc:261
std::shared_ptr< Ex > Ex_ptr
Definition: py_ex.hh:9
pybind11::list terms(Ex_ptr ex)
Definition: py_ex.cc:497
Ex rhs(Ex_ptr ex)
Definition: py_ex.cc:375
pybind11::object Ex_get_mult(Ex_ptr ex)
Definition: py_ex.cc:485
Ex lhs(Ex_ptr ex)
Definition: py_ex.cc:363
Ex_ptr Ex_from_string(const std::string &ex_, bool, Kernel *kernel)
Definition: py_ex.cc:521
std::string Ex_as_input(Ex_ptr ex)
Definition: py_ex.cc:314
Ex Ex_getslice(Ex_ptr ex, pybind11::slice slice)
Definition: py_ex.cc:389