Cadabra
Computer algebra system for field theory problems
Namespaces | Functions
py_ex.cc File Reference
#include "Config.hh"
#include "py_ex.hh"
#include "py_helpers.hh"
#include "py_globals.hh"
#include "py_kernel.hh"
#include "py_algorithms.hh"
#include "algorithms/map_sympy.hh"
#include "Exceptions.hh"
#include "Parser.hh"
#include "PreClean.hh"
#include "Cleanup.hh"
#include "Bridge.hh"
#include "SympyCdb.hh"
#include <sstream>
#include "DisplayMMA.hh"
#include "DisplayTeX.hh"
#include "DisplaySympy.hh"
#include "DisplayTerminal.hh"
#include <ios>
#include <iomanip>

Namespaces

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

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_join (const Ex_ptr ex1, const Ex_ptr ex2)
 
Ex_ptr cadabra::Ex_join (const std::vector< Ex_ptr > &exs)
 
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)
 
Ex_comparator::match_t cadabra::ExNode_compare (const ExNode &lhs, const ExNode &rhs, const std::string &use_props, bool ignore_parent_rel)
 
std::string cadabra::print_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)
 
long cadabra::Ex_int_cast (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)
 
std::shared_ptr< sympy::SympyBridgecadabra::SympyBridge_init (std::shared_ptr< Ex > ex)
 
Ex_ptr cadabra::Ex_from_string (const std::string &ex_, bool, Kernel *kernel)
 
Ex_ptr cadabra::Ex_from_int (int num, bool)
 
void cadabra::call_post_process (Kernel &kernel, Ex_ptr ex)
 
void cadabra::Ex_cleanup (Ex_ptr ex)
 
Ex_ptr cadabra::map_sympy_wrapper (Ex_ptr ex, std::string head, pybind11::args args)
 
void cadabra::init_ex (py::module &m)