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:259
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:284
pybind11::object Ex_as_sympy(Ex_ptr ex)
Outputs a Cadabra 'Ex' as a Sympy expression.
Definition: py_ex.cc:294
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:616
void Ex_setitem(Ex_ptr ex, int index, Ex val)
Definition: py_ex.cc:441
void Ex_setitem_iterator(Ex_ptr ex, ExNode en, Ex_ptr val)
Definition: py_ex.cc:452
size_t Ex_len(Ex_ptr ex)
Definition: py_ex.cc:478
Ex Ex_getitem(Ex &ex, int index)
Definition: py_ex.cc:424
std::string Ex_head(Ex_ptr ex)
Definition: py_ex.cc:490
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:309
void init_ex(py::module &m)
Definition: py_ex.cc:624
std::string Ex_as_MMA(Ex_ptr ex, bool use_unicode)
Definition: py_ex.cc:340
std::string Ex_as_tree(Ex *ex)
Ex_ptr Ex_from_int(int num, bool)
Definition: py_ex.cc:573
void call_post_process(Kernel &kernel, Ex_ptr ex)
Definition: py_ex.cc:579
std::string Ex_as_repr(Ex_ptr ex)
Definition: py_ex.cc:273
std::shared_ptr< Ex > Ex_ptr
Definition: py_ex.hh:9
pybind11::list terms(Ex_ptr ex)
Definition: py_ex.cc:509
Ex rhs(Ex_ptr ex)
Definition: py_ex.cc:387
pybind11::object Ex_get_mult(Ex_ptr ex)
Definition: py_ex.cc:497
Ex lhs(Ex_ptr ex)
Definition: py_ex.cc:375
Ex_ptr Ex_from_string(const std::string &ex_, bool, Kernel *kernel)
Definition: py_ex.cc:533
std::string Ex_as_input(Ex_ptr ex)
Definition: py_ex.cc:326
Ex Ex_getslice(Ex_ptr ex, pybind11::slice slice)
Definition: py_ex.cc:401