5 #include "../Storage.hh" 6 #include "../ExNode.hh" 9 using Ex_ptr = std::shared_ptr<Ex>;
105 #ifdef MATHEMATICA_FOUND 111 void init_ex(pybind11::module& m);
Ex_ptr Ex_from_string(const std::string &ex_, bool, Kernel *kernel)
Definition: py_ex.cc:501
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:276
Ex_ptr Ex_sub(const Ex_ptr ex1, const ExNode ex2)
Subtract two expressions, adding a top-level node if required.
Definition: py_ex.cc:155
void Ex_setitem_iterator(Ex_ptr ex, ExNode en, Ex_ptr val)
Definition: py_ex.cc:420
Ex_ptr Ex_from_int(int num, bool)
Definition: py_ex.cc:541
Ex Ex_getslice(Ex_ptr ex, pybind11::slice slice)
Definition: py_ex.cc:368
std::string Ex_as_MMA(Ex_ptr ex, bool use_unicode)
Definition: py_ex.cc:307
ExNode is a combination of an Ex::iterator and an interface which we can use to manipulate the data p...
Definition: ExNode.hh:29
Ex_ptr Ex_mul(const Ex_ptr ex1, const Ex_ptr ex2)
Multiply two expressions, adding a top-level node if required.
Definition: py_ex.cc:134
Basic storage class for symbolic mathemematical expressions.
Definition: Storage.hh:141
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:251
void Ex_setitem(Ex_ptr ex, int index, Ex val)
Definition: py_ex.cc:409
std::string Ex_head(Ex_ptr ex)
Definition: py_ex.cc:458
std::string Ex_as_repr(Ex_ptr ex)
Definition: py_ex.cc:240
std::shared_ptr< Ex > Ex_ptr
Definition: py_ex.hh:9
Ex rhs(Ex_ptr ex)
Definition: py_ex.cc:354
Ex_ptr Ex_add(const Ex_ptr ex1, const ExNode ex2)
Add two expressions, adding a top-level node if required.
Definition: py_ex.cc:49
Functions to handle the exchange properties of two or more symbols in a product.
Definition: Adjform.cc:83
pybind11::object Ex_as_sympy(Ex_ptr ex)
Outputs a Cadabra 'Ex' as a Sympy expression.
Definition: py_ex.cc:261
std::string Ex_as_tree(Ex *ex)
pybind11::list terms(Ex_ptr ex)
Definition: py_ex.cc:477
std::string Ex_as_input(Ex_ptr ex)
Definition: py_ex.cc:293
Ex_ptr map_sympy_wrapper(Ex_ptr ex, std::string head, pybind11::args args)
Definition: py_ex.cc:584
std::string Ex_as_str(Ex_ptr ex)
Generate the Python str() and repr() representation of the Ex object.
Definition: py_ex.cc:226
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:191
bool Ex_compare(Ex_ptr one, Ex_ptr other)
Comparison operator for Ex objects in Python.
Definition: py_ex.cc:38
Ex Ex_getitem(Ex &ex, int index)
Definition: py_ex.cc:392
void init_ex(py::module &m)
Definition: py_ex.cc:592
Ex lhs(Ex_ptr ex)
Definition: py_ex.cc:342
void call_post_process(Kernel &kernel, Ex_ptr ex)
Definition: py_ex.cc:547
pybind11::object Ex_get_mult(Ex_ptr ex)
Definition: py_ex.cc:465
size_t Ex_len(Ex_ptr ex)
Definition: py_ex.cc:446