![]() |
Cadabra
Computer algebra system for field theory problems
|
#include <memory>
#include "Config.hh"
#include "PythonCdb.hh"
#include "ExNode.hh"
#include "SympyCdb.hh"
#include "json/json.h"
#include "CdbPython.hh"
#include "Parser.hh"
#include "Bridge.hh"
#include "Exceptions.hh"
#include "DisplayMMA.hh"
#include "DisplayTeX.hh"
#include "DisplaySympy.hh"
#include "DisplayTerminal.hh"
#include "Cleanup.hh"
#include "PreClean.hh"
#include "PythonException.hh"
#include "ProgressMonitor.hh"
#include <pybind11/pybind11.h>
#include <pybind11/embed.h>
#include <pybind11/operators.h>
#include <pybind11/stl.h>
#include <boost/algorithm/string/replace.hpp>
#include <sstream>
#include <regex>
#include "properties/Accent.hh"
#include "properties/AntiCommuting.hh"
#include "properties/AntiSymmetric.hh"
#include "properties/Commuting.hh"
#include "properties/Coordinate.hh"
#include "properties/Depends.hh"
#include "properties/DependsInherit.hh"
#include "properties/Derivative.hh"
#include "properties/Determinant.hh"
#include "properties/DifferentialForm.hh"
#include "properties/DiracBar.hh"
#include "properties/GammaMatrix.hh"
#include "properties/CommutingAsProduct.hh"
#include "properties/CommutingAsSum.hh"
#include "properties/DAntiSymmetric.hh"
#include "properties/Diagonal.hh"
#include "properties/Distributable.hh"
#include "properties/EpsilonTensor.hh"
#include "properties/ExteriorDerivative.hh"
#include "properties/FilledTableau.hh"
#include "properties/ImaginaryI.hh"
#include "properties/ImplicitIndex.hh"
#include "properties/Indices.hh"
#include "properties/IndexInherit.hh"
#include "properties/Integer.hh"
#include "properties/InverseMetric.hh"
#include "properties/KroneckerDelta.hh"
#include "properties/LaTeXForm.hh"
#include "properties/Matrix.hh"
#include "properties/Metric.hh"
#include "properties/NonCommuting.hh"
#include "properties/NumericalFlat.hh"
#include "properties/PartialDerivative.hh"
#include "properties/RiemannTensor.hh"
#include "properties/SatisfiesBianchi.hh"
#include "properties/SelfAntiCommuting.hh"
#include "properties/SelfCommuting.hh"
#include "properties/SelfNonCommuting.hh"
#include "properties/SortOrder.hh"
#include "properties/Spinor.hh"
#include "properties/Symbol.hh"
#include "properties/Symmetric.hh"
#include "properties/Tableau.hh"
#include "properties/TableauSymmetry.hh"
#include "properties/Trace.hh"
#include "properties/Traceless.hh"
#include "properties/Vielbein.hh"
#include "properties/Weight.hh"
#include "properties/WeightInherit.hh"
#include "properties/WeylTensor.hh"
#include "algorithms/canonicalise.hh"
#include "algorithms/collect_components.hh"
#include "algorithms/collect_factors.hh"
#include "algorithms/collect_terms.hh"
#include "algorithms/combine.hh"
#include "algorithms/complete.hh"
#include "algorithms/decompose.hh"
#include "algorithms/decompose_product.hh"
#include "algorithms/distribute.hh"
#include "algorithms/drop_weight.hh"
#include "algorithms/einsteinify.hh"
#include "algorithms/eliminate_kronecker.hh"
#include "algorithms/eliminate_metric.hh"
#include "algorithms/epsilon_to_delta.hh"
#include "algorithms/evaluate.hh"
#include "algorithms/expand.hh"
#include "algorithms/expand_delta.hh"
#include "algorithms/expand_diracbar.hh"
#include "algorithms/expand_power.hh"
#include "algorithms/factor_in.hh"
#include "algorithms/factor_out.hh"
#include "algorithms/fierz.hh"
#include "algorithms/flatten_sum.hh"
#include "algorithms/indexsort.hh"
#include "algorithms/integrate_by_parts.hh"
#include "algorithms/join_gamma.hh"
#include "algorithms/keep_terms.hh"
#include "algorithms/lower_free_indices.hh"
#include "algorithms/lr_tensor.hh"
#include "algorithms/map_sympy.hh"
#include "algorithms/order.hh"
#include "algorithms/product_rule.hh"
#include "algorithms/reduce_delta.hh"
#include "algorithms/rename_dummies.hh"
#include "algorithms/simplify.hh"
#include "algorithms/sort_product.hh"
#include "algorithms/sort_spinors.hh"
#include "algorithms/sort_sum.hh"
#include "algorithms/split_gamma.hh"
#include "algorithms/split_index.hh"
#include "algorithms/substitute.hh"
#include "algorithms/sym.hh"
#include "algorithms/tab_dimension.hh"
#include "algorithms/take_match.hh"
#include "algorithms/replace_match.hh"
#include "algorithms/rewrite_indices.hh"
#include "algorithms/unwrap.hh"
#include "algorithms/unzoom.hh"
#include "algorithms/vary.hh"
#include "algorithms/young_project.hh"
#include "algorithms/young_project_product.hh"
#include "algorithms/young_project_tensor.hh"
#include "algorithms/young_reduce.hh"
#include "algorithms/zoom.hh"
#include <cstdarg>
Functions | |
pybind11::list | ProgressMonitor_totals_helper (ProgressMonitor &self) |
pybind11::list | terms (std::shared_ptr< Ex > ex) |
Ex | lhs (std::shared_ptr< Ex > ex) |
Ex | rhs (std::shared_ptr< Ex > ex) |
Ex | Ex_getslice (std::shared_ptr< Ex > ex, pybind11::slice slice) |
Ex | Ex_getitem (Ex &ex, int index) |
void | Ex_setitem (std::shared_ptr< Ex > ex, int index, Ex val) |
void | Ex_setitem_iterator (std::shared_ptr< Ex > ex, ExNode en, std::shared_ptr< Ex > val) |
size_t | Ex_len (std::shared_ptr< Ex > ex) |
std::string | Ex_head (std::shared_ptr< Ex > ex) |
pybind11::object | Ex_mult (std::shared_ptr< Ex > ex) |
std::string | Ex_str_ (std::shared_ptr< Ex > ex) |
std::string | Ex_to_input (std::shared_ptr< Ex > ex) |
std::string | Ex_latex_ (std::shared_ptr< Ex > ex) |
std::string | Ex_repr_ (std::shared_ptr< Ex > ex) |
std::string | Ex_to_Sympy_string (std::shared_ptr< Ex > ex) |
pybind11::object | Ex_to_Sympy (std::shared_ptr< Ex > ex) |
std::string | Ex_to_MMA (std::shared_ptr< Ex > ex, bool use_unicode) |
pybind11::object | get_locals () |
pybind11::object | get_globals () |
std::shared_ptr< Ex > | fetch_from_python (const std::string &nm) |
std::shared_ptr< Ex > | fetch_from_python (const std::string &nm, pybind11::object scope) |
bool | __eq__Ex_Ex (std::shared_ptr< Ex > one, std::shared_ptr< Ex > other) |
bool | __eq__Ex_int (std::shared_ptr< Ex > one, int other) |
std::shared_ptr< Ex > | make_Ex_from_string (const std::string &ex_, bool make_ref, Kernel *kernel) |
std::shared_ptr< Ex > | construct_Ex_from_string (const std::string &ex_) |
std::shared_ptr< Ex > | construct_Ex_from_string_2 (const std::string &ex_, bool add_ref) |
std::shared_ptr< Ex > | make_Ex_from_int (int num, bool make_ref=true) |
std::shared_ptr< Ex > | construct_Ex_from_int (int num) |
std::shared_ptr< Ex > | construct_Ex_from_int_2 (int num, bool add_ref) |
std::shared_ptr< Ex > | operator+ (const std::shared_ptr< Ex > ex1, const ExNode ex2) |
std::shared_ptr< Ex > | operator+ (const std::shared_ptr< Ex > ex1, const std::shared_ptr< Ex > ex2) |
std::shared_ptr< Ex > | add_ex (const std::shared_ptr< Ex > ex1, const std::shared_ptr< Ex > ex2, Ex::iterator top2) |
std::shared_ptr< Ex > | operator* (const std::shared_ptr< Ex > ex1, const std::shared_ptr< Ex > ex2) |
std::shared_ptr< Ex > | mult_ex (const std::shared_ptr< Ex > ex1, const std::shared_ptr< Ex > ex2, Ex::iterator top2) |
std::shared_ptr< Ex > | operator- (const std::shared_ptr< Ex > ex1, const ExNode ex2) |
std::shared_ptr< Ex > | operator- (const std::shared_ptr< Ex > ex1, const std::shared_ptr< Ex > ex2) |
std::shared_ptr< Ex > | sub_ex (const std::shared_ptr< Ex > ex1, const std::shared_ptr< Ex > ex2, Ex::iterator top2) |
std::string | init_ipython () |
pybind11::list | list_properties () |
std::string | print_tree (Ex *ex) |
bool | scope_has (const pybind11::dict &dict, const std::string &obj) |
Kernel * | get_kernel_from_scope () |
ProgressMonitor * | get_progress_monitor () |
Kernel * | create_scope () |
Kernel * | create_scope_from_global () |
Kernel * | create_empty_scope () |
void | inject_defaults (Kernel *k) |
template<class F > | |
std::shared_ptr< Ex > | dispatch_base (std::shared_ptr< Ex > ex, F &algo, bool deep, bool repeat, unsigned int depth, bool pre_order) |
std::shared_ptr< Ex > | map_sympy_wrapper (std::shared_ptr< Ex > ex, std::string head, pybind11::args args) |
void | call_post_process (Kernel &kernel, std::shared_ptr< Ex > ex) |
template<class F > | |
std::shared_ptr< Ex > | dispatch_ex (std::shared_ptr< Ex > ex, bool deep, bool repeat, unsigned int depth) |
template<class F , typename Arg1 > | |
std::shared_ptr< Ex > | dispatch_ex (std::shared_ptr< Ex > ex, Arg1 arg, bool deep, bool repeat, unsigned int depth) |
template<class F , typename Arg1 > | |
std::shared_ptr< Ex > | dispatch_ex_preorder (std::shared_ptr< Ex > ex, Arg1 arg, bool deep, bool repeat, unsigned int depth) |
template<class F , typename Arg1 , typename Arg2 > | |
std::shared_ptr< Ex > | dispatch_ex (std::shared_ptr< Ex > ex, Arg1 arg1, Arg2 arg2, bool deep, bool repeat, unsigned int depth) |
template<class F , typename Arg1 , typename Arg2 , typename Arg3 > | |
std::shared_ptr< Ex > | dispatch_ex (std::shared_ptr< Ex > ex, Arg1 arg1, Arg2 arg2, Arg3 arg3, bool deep, bool repeat, unsigned int depth) |
template<class F > | |
void | def_algo_1 (const std::string &name, pybind11::module &m) |
template<class P > | |
void | def_prop (pybind11::module &m) |
void | compile_package (const std::string &in_name, const std::string &out_name) |
PYBIND11_MODULE (cadabra2, m) | |
Variables | |
bool | output_ipython = false |
bool | post_process_enabled = true |
bool __eq__Ex_int | ( | std::shared_ptr< Ex > | one, |
int | other | ||
) |
std::shared_ptr<Ex> add_ex | ( | const std::shared_ptr< Ex > | ex1, |
const std::shared_ptr< Ex > | ex2, | ||
Ex::iterator | top2 | ||
) |
void compile_package | ( | const std::string & | in_name, |
const std::string & | out_name | ||
) |
std::shared_ptr<Ex> construct_Ex_from_int | ( | int | num | ) |
std::shared_ptr<Ex> construct_Ex_from_int_2 | ( | int | num, |
bool | add_ref | ||
) |
std::shared_ptr<Ex> construct_Ex_from_string | ( | const std::string & | ex_ | ) |
std::shared_ptr<Ex> construct_Ex_from_string_2 | ( | const std::string & | ex_, |
bool | add_ref | ||
) |
Kernel* create_empty_scope | ( | ) |
Kernel* create_scope | ( | ) |
Kernel* create_scope_from_global | ( | ) |
void def_algo_1 | ( | const std::string & | name, |
pybind11::module & | m | ||
) |
void def_prop | ( | pybind11::module & | m | ) |
std::shared_ptr<Ex> dispatch_base | ( | std::shared_ptr< Ex > | ex, |
F & | algo, | ||
bool | deep, | ||
bool | repeat, | ||
unsigned int | depth, | ||
bool | pre_order | ||
) |
std::shared_ptr<Ex> dispatch_ex | ( | std::shared_ptr< Ex > | ex, |
bool | deep, | ||
bool | repeat, | ||
unsigned int | depth | ||
) |
std::shared_ptr<Ex> dispatch_ex | ( | std::shared_ptr< Ex > | ex, |
Arg1 | arg, | ||
bool | deep, | ||
bool | repeat, | ||
unsigned int | depth | ||
) |
std::shared_ptr<Ex> dispatch_ex | ( | std::shared_ptr< Ex > | ex, |
Arg1 | arg1, | ||
Arg2 | arg2, | ||
bool | deep, | ||
bool | repeat, | ||
unsigned int | depth | ||
) |
std::shared_ptr<Ex> dispatch_ex | ( | std::shared_ptr< Ex > | ex, |
Arg1 | arg1, | ||
Arg2 | arg2, | ||
Arg3 | arg3, | ||
bool | deep, | ||
bool | repeat, | ||
unsigned int | depth | ||
) |
std::shared_ptr<Ex> dispatch_ex_preorder | ( | std::shared_ptr< Ex > | ex, |
Arg1 | arg, | ||
bool | deep, | ||
bool | repeat, | ||
unsigned int | depth | ||
) |
std::string Ex_head | ( | std::shared_ptr< Ex > | ex | ) |
std::string Ex_latex_ | ( | std::shared_ptr< Ex > | ex | ) |
size_t Ex_len | ( | std::shared_ptr< Ex > | ex | ) |
pybind11::object Ex_mult | ( | std::shared_ptr< Ex > | ex | ) |
std::string Ex_repr_ | ( | std::shared_ptr< Ex > | ex | ) |
std::string Ex_str_ | ( | std::shared_ptr< Ex > | ex | ) |
std::string Ex_to_input | ( | std::shared_ptr< Ex > | ex | ) |
std::string Ex_to_MMA | ( | std::shared_ptr< Ex > | ex, |
bool | use_unicode | ||
) |
pybind11::object Ex_to_Sympy | ( | std::shared_ptr< Ex > | ex | ) |
std::string Ex_to_Sympy_string | ( | std::shared_ptr< Ex > | ex | ) |
std::shared_ptr<Ex> fetch_from_python | ( | const std::string & | nm | ) |
std::shared_ptr<Ex> fetch_from_python | ( | const std::string & | nm, |
pybind11::object | scope | ||
) |
pybind11::object get_globals | ( | ) |
Kernel* get_kernel_from_scope | ( | ) |
pybind11::object get_locals | ( | ) |
ProgressMonitor* get_progress_monitor | ( | ) |
std::string init_ipython | ( | ) |
void inject_defaults | ( | Kernel * | k | ) |
pybind11::list list_properties | ( | ) |
std::shared_ptr<Ex> make_Ex_from_int | ( | int | num, |
bool | make_ref = true |
||
) |
std::shared_ptr<Ex> map_sympy_wrapper | ( | std::shared_ptr< Ex > | ex, |
std::string | head, | ||
pybind11::args | args | ||
) |
std::shared_ptr<Ex> mult_ex | ( | const std::shared_ptr< Ex > | ex1, |
const std::shared_ptr< Ex > | ex2, | ||
Ex::iterator | top2 | ||
) |
std::string print_tree | ( | Ex * | ex | ) |
pybind11::list ProgressMonitor_totals_helper | ( | ProgressMonitor & | self | ) |
PYBIND11_MODULE | ( | cadabra2 | , |
m | |||
) |
bool scope_has | ( | const pybind11::dict & | dict, |
const std::string & | obj | ||
) |
std::shared_ptr<Ex> sub_ex | ( | const std::shared_ptr< Ex > | ex1, |
const std::shared_ptr< Ex > | ex2, | ||
Ex::iterator | top2 | ||
) |
pybind11::list terms | ( | std::shared_ptr< Ex > | ex | ) |
bool output_ipython = false |
bool post_process_enabled = true |