Cadabra
Computer algebra system for field theory problems
Namespaces | Typedefs | Functions
py_ex.hh File Reference
#include <memory>
#include "../Storage.hh"
#include "../ExNode.hh"

Go to the source code of this file.

Namespaces

 cadabra
 Functions to handle the exchange properties of two or more symbols in a product.
 

Typedefs

using cadabra::Ex_ptr = std::shared_ptr< Ex >
 

Functions

bool cadabra::Ex_compare (Ex_ptr, Ex_ptr)
 Comparison operator for Ex objects in Python. More...
 
bool cadabra::Ex_compare (Ex_ptr one, int other)
 
Ex_ptr cadabra::Ex_add (const Ex_ptr ex1, const ExNode ex2)
 Add two expressions, adding a top-level '\sum' node if required. More...
 
Ex_ptr cadabra::Ex_add (const Ex_ptr ex1, const Ex_ptr ex2)
 
Ex_ptr cadabra::Ex_add (const Ex_ptr ex1, const Ex_ptr ex2, Ex::iterator top2)
 
Ex_ptr cadabra::Ex_mul (const Ex_ptr ex1, const Ex_ptr ex2)
 Multiply two expressions, adding a top-level '\prod' node if required. More...
 
Ex_ptr cadabra::Ex_mul (const Ex_ptr ex1, const Ex_ptr ex2, Ex::iterator top2)
 
Ex_ptr cadabra::Ex_sub (const Ex_ptr ex1, const ExNode ex2)
 Subtract two expressions, adding a top-level '\sum' node if required. More...
 
Ex_ptr cadabra::Ex_sub (const Ex_ptr ex1, const Ex_ptr ex2)
 
Ex_ptr cadabra::Ex_sub (const Ex_ptr ex1, const Ex_ptr ex2, Ex::iterator top2)
 
Ex_ptr cadabra::fetch_from_python (const std::string &nm)
 Fetch an Ex object from the Python side using its Python identifier. More...
 
Ex_ptr cadabra::fetch_from_python (const std::string &nm, pybind11::object scope)
 
std::string cadabra::Ex_as_str (Ex_ptr)
 Generate the Python str() and repr() representation of the Ex object. More...
 
std::string cadabra::Ex_as_repr (Ex_ptr ex)
 
std::string cadabra::Ex_as_latex (Ex_ptr)
 The Python 'print' function always calls the 'str' member on objects to be printed. More...
 
pybind11::object cadabra::Ex_as_sympy (Ex_ptr)
 Outputs a Cadabra 'Ex' as a Sympy expression. More...
 
std::string cadabra::Ex_as_sympy_string (Ex_ptr)
 Similar to Ex_to_Sympy, but only producing a string which can be parsed by Sympy, instead of a full-fledged Sympy expression. More...
 
std::string cadabra::Ex_as_input (Ex_ptr ex)
 
std::string cadabra::Ex_as_MMA (Ex_ptr ex, bool use_unicode)
 
std::string cadabra::Ex_as_tree (Ex *ex)
 
Ex cadabra::lhs (Ex_ptr ex)
 
Ex cadabra::rhs (Ex_ptr ex)
 
Ex cadabra::Ex_getslice (Ex_ptr ex, pybind11::slice slice)
 
Ex cadabra::Ex_getitem (Ex &ex, int index)
 
void cadabra::Ex_setitem (Ex_ptr ex, int index, Ex val)
 
void cadabra::Ex_setitem_iterator (Ex_ptr ex, ExNode en, Ex_ptr val)
 
size_t cadabra::Ex_len (Ex_ptr ex)
 
std::string cadabra::Ex_head (Ex_ptr ex)
 
pybind11::object cadabra::Ex_get_mult (Ex_ptr ex)
 
pybind11::list cadabra::terms (Ex_ptr ex)
 
Ex_ptr cadabra::Ex_from_string (const std::string &ex_, bool, Kernel *kernel)
 
Ex_ptr cadabra::Ex_from_int (int num, bool)
 
Ex_ptr cadabra::map_sympy_wrapper (Ex_ptr ex, std::string head, pybind11::args args)
 
void cadabra::call_post_process (Kernel &kernel, Ex_ptr ex)
 
void cadabra::init_ex (pybind11::module &m)