Functions to handle the exchange properties of two or more symbols in a product.
More...
|
class | Adjform |
| Representation of the index structure of a tensor monomial, using a storage format which resembles an adjacency matrix. More...
|
|
class | IndexMap |
| To ensure consistency when creating adjforms out of two different Ex objects an IndexMap object is required which keeps track of which numeric index represents which index name. More...
|
|
class | ProjectedAdjform |
| Representation of a sum of tensor monomials, each having the same tensor names, but with different index positions. More...
|
|
class | Algorithm |
| Base class for all algorithms, containing generic routines and in particular the logic for index classification. More...
|
|
class | ConvertData |
| Object to store pre-parsing intermediate results. More...
|
|
class | tree_less_obj |
| Compare two trees by pattern logic, i.e. modulo index names. More...
|
|
class | tree_less_modprel_obj |
|
class | tree_equal_obj |
|
class | tree_exact_less_obj |
| Compare two trees exactly, i.e. including exact index names. More...
|
|
class | tree_exact_less_mod_prel_obj |
|
class | tree_exact_equal_obj |
|
class | tree_exact_equal_mod_prel_obj |
|
class | tree_exact_less_for_indexmap_obj |
| Compare for indexmap_t. More...
|
|
class | tree_exact_less_no_wildcards_obj |
| Compare two trees exactly, treat wildcard names as ordinary names. More...
|
|
class | tree_exact_less_no_wildcards_mod_prel_obj |
|
class | Ex_comparator |
| A generic tree comparison class which will take into account index contractions and will also keep track of a replacement list for all types of cadabra wildcards. More...
|
|
class | Ex_is_equivalent |
| Basic comparison operator for tree iterators, so we can use them as keys in maps. More...
|
|
class | Ex_is_less |
|
class | DataCell |
| DataCells are the basic building blocks for a document. More...
|
|
class | DisplayBase |
| Base class for all display classes. More...
|
|
class | DisplayMMA |
| Class to display expressions in a format that Mathematica can parse. More...
|
|
class | DisplaySympy |
| Class to display expressions in a format that Sympy can parse. More...
|
|
class | DisplayTerminal |
| Class to display expressions to the terminal. More...
|
|
class | DisplayTeX |
| Class to handle display of expressions using LaTeX notation. More...
|
|
class | exchange |
|
struct | split_it |
|
class | Ex_hasher |
|
class | IndexClassifier |
|
class | index_iterator |
| An iterator which iterates over indices even if they are at lower levels, i.e. More...
|
|
struct | iter_indices |
|
class | Kernel |
|
class | NEvaluator |
| Functionality to numerically evaluate a scalar expression, give the values of its building blocks. More...
|
|
class | NTensor |
|
class | Parser |
| Class which turns the string output of a preprocessor object and turns it into an Ex expression tree. More...
|
|
class | pattern |
|
class | keyval_t |
| Arguments to properties get parsed into a keyval_t structure. More...
|
|
class | property |
| Base class for all properties, handling argument parsing and defining the interface. More...
|
|
class | labelled_property |
|
class | list_property |
| Something cannot be both a list property and a normal property at the same time, so we can safely inherit without virtual. More...
|
|
class | Inherit |
| If a property X derives from Inherit<Y>, and get<Y> is called on an object which has an X property (but no Y property), then the get<Y> will look at the non-index child of the object to see if that has a Y property. More...
|
|
class | PropertyInherit |
| PropertyInherit is like Inherit<T> for all properties. More...
|
|
class | Properties |
| Class holding a collection of properties attached to expressions. More...
|
|
class | str_node |
| Elementary building block for a mathematical expression. More...
|
|
class | Ex |
| Basic storage class for symbolic mathemematical expressions. More...
|
|
class | nset_it_less |
| Compare two nset iterators by comparing the strings to which they point. More...
|
|
class | TerminalStream |
|
class | BoundPropertyBase |
|
class | BoundProperty |
|
class | canonicalise |
| Canonicalise the index structure of a tensorial expression. More...
|
|
class | collect_components |
| Collect \components terms inside a sum, merging their substitution rules. More...
|
|
class | collect_factors |
| Collect symbolically equal factors in a product. More...
|
|
class | collect_terms |
| Collect symbolically equal terms in a sum. More...
|
|
class | combine |
|
class | complete |
| Complete a set of coordinate rules so that they also cover related tensors. More...
|
|
class | component |
|
class | decompose |
|
class | decompose_product |
| Decompose a product of tensors by applying Young projectors. More...
|
|
class | distribute |
| Distribute factors over a sum, that is, \( (A+B) C \rightarrow A C + B C \). More...
|
|
class | drop_keep_weight |
|
class | drop_weight |
|
class | keep_weight |
|
class | einsteinify |
|
class | eliminate_kronecker |
|
class | eliminate_converter |
|
class | eliminate_metric |
|
class | eliminate_vielbein |
|
class | epsilon_to_delta |
|
class | evaluate |
|
class | expand |
|
class | expand_delta |
|
class | expand_diracbar |
|
class | expand_dummies |
|
class | expand_power |
|
class | explicit_indices |
|
class | factor_in |
|
class | factor_out |
|
class | fierz |
|
class | flatten_product |
|
class | flatten_sum |
|
class | indexsort |
|
class | integrate_by_parts |
| Integrate by parts away from the indicated derivative object. More...
|
|
class | join_gamma |
|
class | keep_terms |
|
class | lower_free_indices |
|
class | lr_tensor |
|
class | map_mma |
| Functionality to act with Mathematica on all scalar parts of an expression, and keep the result in-place. More...
|
|
class | map_sympy |
| Functionality to act with Sympy on all scalar parts of an expression, and keep the result in-place. More...
|
|
class | meld |
|
class | nevaluate |
|
class | order |
|
class | product_rule |
|
class | reduce_delta |
|
class | rename_dummies |
|
class | replace_match |
|
class | rewrite_indices |
|
class | simplify |
| General purpose brute force scalar simplification algorithm. More...
|
|
class | sort_product |
|
class | sort_spinors |
|
class | sort_sum |
|
class | split |
| Split an expression into terms or factors. More...
|
|
class | split_gamma |
|
class | split_index |
|
class | substitute |
| Generic substitution algorithm. More...
|
|
class | sym |
|
class | tab_basics |
|
class | tabdimension |
|
class | take_match |
|
class | untrace |
|
class | unwrap |
|
class | unzoom |
|
class | vary |
| Generic variational derivative algorithm. More...
|
|
class | young_project |
|
class | young_project_product |
|
class | young_project_tensor |
|
class | zoom |
|
class | Accent |
|
class | AntiCommuting |
|
class | AntiSymmetric |
|
class | Commuting |
|
class | CommutingAsProduct |
|
class | CommutingAsSum |
|
class | CommutingBehaviour |
|
class | Coordinate |
|
class | DAntiSymmetric |
|
class | Depends |
|
class | DependsBase |
|
class | DependsInherit |
|
class | Derivative |
|
class | DerivativeOp |
|
class | Determinant |
|
class | Diagonal |
|
class | DifferentialForm |
|
class | DifferentialFormBase |
|
class | DiracBar |
|
class | Distributable |
|
class | EpsilonTensor |
|
class | ExteriorDerivative |
|
class | FilledTableau |
|
class | GammaMatrix |
|
class | GammaTraceless |
|
class | ImaginaryI |
|
class | ImplicitIndex |
|
class | IndexInherit |
|
class | Indices |
|
class | Integer |
| Property indicating that a symbolic object always takes integer values. More...
|
|
class | Integral |
|
class | InverseMetric |
|
class | KroneckerDelta |
|
class | LaTeXForm |
|
class | Matrix |
|
class | Metric |
|
class | NonCommuting |
|
class | NumericalFlat |
| Property indicating that an operator is numerically flat, so that numerical factors in the argument can be taken outside. More...
|
|
class | PartialDerivative |
|
class | RiemannTensor |
|
class | SatisfiesBianchi |
|
class | SelfAntiCommuting |
|
class | SelfCommuting |
|
class | SelfCommutingBehaviour |
|
class | SelfNonCommuting |
|
class | SortOrder |
|
class | Spinor |
|
class | Symbol |
|
class | Symmetric |
|
class | Tableau |
| Property representing a Young tableau with unlabelled boxes. More...
|
|
class | TableauBase |
|
class | TableauInherit |
| Property which makes a node inherit the TableauBase properties of child nodes. More...
|
|
class | TableauSymmetry |
|
class | Trace |
|
class | Traceless |
|
class | Vielbein |
|
class | InverseVielbein |
|
class | Weight |
|
class | WeightBase |
|
class | WeightInherit |
|
class | WeylTensor |
|
class | ActionBase |
| All actions derive from the ActionBase object, which defines the interface they need to implement. More...
|
|
class | ActionAddCell |
| Add a cell to the notebook. More...
|
|
class | ActionPositionCursor |
| Position the cursor relative to the indicated cell. More...
|
|
class | ActionSetRunStatus |
| Update the running status of the indicated cell. More...
|
|
class | ActionRemoveCell |
| Remove a cell and all its child cells from the document. More...
|
|
class | ActionReplaceCell |
| Replace the contents of a cell. More...
|
|
class | ActionSplitCell |
| Split a cell into two separate cells, at the point of the cursor. More...
|
|
class | ActionInsertText |
| Add a text string (can be just a single character) at the point of the cursor. More...
|
|
class | ActionCompleteText |
| Complete text at a point in a GUI cell with one or more alternative. More...
|
|
class | ActionEraseText |
| Remove a text string starting at the indicated position, and with the indicated length, from the indicated cell. More...
|
|
class | CadabraJupyter |
| A Jupyter kernel for Cadabra, which provides the Cadabra pre-processor to enable input as in the Gtk notebook frontend. More...
|
|
class | ComputeThread |
| Base class which talks to the server and sends Action objects back to the DocumentThread. More...
|
|
class | DocumentThread |
| A base class with all the logic to manipulate a Cadabra notebook document. More...
|
|
class | GUIBase |
| Abstract base class with methods that need to be implemented by any GUI. More...
|
|
class | TeXEngine |
| TeXEngine is used to convert LaTeX strings into PNG images. More...
|
|
class | ChooseColoursDialog |
|
class | CodeInput |
| A text cell editor widget with support for editing Python and LaTeX. More...
|
|
class | Console |
|
class | ImageView |
| An image viewing widget. More...
|
|
class | NotebookCanvas |
|
class | NotebookWindow |
| Each notebook has one main window which controls it. More...
|
|
class | TeXView |
| TeXView is a widget which knows how to turn a string into a LaTeX-rendered image and display that. More...
|
|
class | VisualCell |
| Structure holding a pointer to one of the possible GUI widgets that can appear in a document. More...
|
|
|
bool | is_coordinate (const Kernel &kernel, Ex::iterator it) |
|
bool | is_index (const Kernel &kernel, Ex::iterator it, bool include_coordinates) |
|
ProjectedAdjform | operator+ (ProjectedAdjform lhs, const ProjectedAdjform &rhs) |
|
ProjectedAdjform | operator* (ProjectedAdjform lhs, const ProjectedAdjform::integer_type &rhs) |
|
std::string | escape_quotes (const std::string &) |
|
std::string | cdb2python (const std::string &, bool display) |
| Convert a block of Cadabra notation into pure Python. More...
|
|
std::string | cdb2python_string (const std::string &, bool display) |
|
std::string | convert_line (const std::string &, ConvertData &cv, bool display) |
| Detect Cadabra expression statements and rewrite to Python form. More...
|
|
std::string | cnb2python (const std::string &, bool for_standalone) |
| Convert a Cadabra notebook file to pure Python. More...
|
|
void | cleanup_dispatch (const Kernel &k, Ex &, Ex::iterator &it) |
| Central cleanup dispatch routine, which calls the other cleanup functions defined later. More...
|
|
void | check_index_consistency (const Kernel &k, Ex &tr, Ex::iterator it) |
| Generic tool to check for index inconsistencies independent of running any algorithm. More...
|
|
bool | cleanup_fraclike (const Kernel &k, Ex &, Ex::iterator &it) |
| Individual node cleanup routines. More...
|
|
bool | cleanup_powlike (const Kernel &k, Ex &tr, Ex::iterator &it) |
|
bool | cleanup_productlike (const Kernel &k, Ex &tr, Ex::iterator &it) |
|
bool | cleanup_sumlike (const Kernel &k, Ex &tr, Ex::iterator &it) |
|
bool | push_down_multiplier (const Kernel &k, Ex &tr, Ex::iterator it) |
| Given a node with a non-unit multiplier, push this multiplier down the tree if the node is not allowed to have a non-unit multiplier. More...
|
|
bool | cleanup_components (const Kernel &k, Ex &tr, Ex::iterator &it) |
|
bool | cleanup_partialderivative (const Kernel &, Ex &tr, Ex::iterator &it) |
|
bool | cleanup_derivative (const Kernel &k, Ex &tr, Ex::iterator &it) |
|
bool | cleanup_numericalflat (const Kernel &, Ex &tr, Ex::iterator &it) |
|
bool | cleanup_diagonal (const Kernel &k, Ex &tr, Ex::iterator &it) |
|
bool | cleanup_kronecker (const Kernel &, Ex &tr, Ex::iterator &it) |
|
bool | cleanup_exterior_derivative (const Kernel &k, Ex &tr, Ex::iterator &it) |
|
bool | cleanup_comma (const Kernel &k, Ex &tr, Ex::iterator &it) |
|
bool | cleanup_tie (const Kernel &k, Ex &tr, Ex::iterator &it) |
|
void | cleanup_dispatch_deep (const Kernel &k, Ex &, dispatcher_t disp=&cleanup_dispatch) |
| More general cleanup of an entire tree. More...
|
|
void | cleanup_dispatch_deep (const Kernel &k, Ex &tr, Ex::iterator &, dispatcher_t dispatch) |
|
int | subtree_compare (const Properties *, Ex::iterator one, Ex::iterator two, int mod_prel=-2, bool checksets=true, int compare_multiplier=-2, bool literal_wildcards=false) |
| Basic building block subtree comparison function for tensors without dummy indices, which determines whether two tensor subtrees are equal up to the names of indices. More...
|
|
bool | tree_less (const Properties *, const Ex &one, const Ex &two, int mod_prel=-2, bool checksets=true, int compare_multiplier=-2) |
| Various comparison functions, some exact, some with pattern logic. More...
|
|
bool | tree_equal (const Properties *properties, const Ex &one, const Ex &two, int mod_prel, bool checksets, int compare_multiplier) |
|
bool | tree_exact_less (const Properties *properties, const Ex &one, const Ex &two, int mod_prel, bool checksets, int compare_multiplier, bool literal_wildcards) |
|
bool | tree_exact_equal (const Properties *properties, const Ex &one, const Ex &two, int mod_prel, bool checksets, int compare_multiplier, bool literal_wildcards) |
|
bool | subtree_less (const Properties *properties, Ex::iterator one, Ex::iterator two, int mod_prel, bool checksets, int compare_multiplier) |
|
bool | subtree_equal (const Properties *properties, Ex::iterator one, Ex::iterator two, int mod_prel, bool checksets, int compare_multiplier) |
|
bool | subtree_exact_less (const Properties *properties, Ex::iterator one, Ex::iterator two, int mod_prel, bool checksets, int compare_multiplier, bool literal_wildcards) |
|
bool | subtree_exact_equal (const Properties *properties, Ex::iterator one, Ex::iterator two, int mod_prel, bool checksets, int compare_multiplier, bool literal_wildcards) |
|
std::string | JSON_serialise (const DTree &) |
| Serialise a document into .cj format, which is a JSON version of the document tree. More...
|
|
void | JSON_recurse (const DTree &, DTree::iterator, nlohmann::json &) |
|
void | JSON_deserialise (const std::string &, DTree &) |
| Load a document from .cnb format, i.e. the inverse of the above. More...
|
|
void | JSON_in_recurse (DTree &doc, DTree::iterator loc, const nlohmann::json &cells) |
|
std::string | export_as_HTML (const DTree &doc, bool for_embedding=false, bool strip_code=false, std::string title="") |
| Export a document to a single self-contained HTML file containing inline CSS. More...
|
|
void | HTML_recurse (const DTree &doc, DTree::iterator it, std::ostringstream &str, const std::string &preamble_string, bool for_embedding=false, bool strip_code=false, std::string title="") |
|
std::string | latex_to_html (const std::string &) |
| Convert various LaTeX constructions to HTML-with-Mathjax, e.g. More...
|
|
std::string | export_as_LaTeX (const DTree &doc, const std::string &image_file_base, bool for_embedding=false) |
| Export a document to a single self-contained LaTeX file, with the exception of images which get saved as separate numbered files. More...
|
|
void | LaTeX_recurse (const DTree &doc, DTree::iterator it, std::ostringstream &str, const std::string &preamble_string, const std::string &image_file_base, int &image_num, bool for_embedding) |
|
std::string | export_as_python (const DTree &doc) |
| Export a document to a python-like file (converting text cells to comments and python cells to python code, dropping output cells). More...
|
|
void | python_recurse (const DTree &doc, DTree::iterator it, std::ostringstream &str) |
|
nlohmann::json | ipynb2cnb (const nlohmann::json &) |
| Replace all occurrences of a substring in the original string. More...
|
|
nlohmann::json | cnb2ipynb (const nlohmann::json &) |
| Convert the JSON of a Cadabra notebook to a Jupyter notebook. More...
|
|
template<typename DisplayType > |
std::string | ex_to_string (const Kernel &kernel, const Ex &ex) |
|
template<typename DisplayType > |
std::string | ex_to_string (const Kernel &kernel, Ex::iterator it) |
|
const char * | unichar (kunichar c) |
|
bool | operator< (const exchange::tensor_type_t &one, const exchange::tensor_type_t &two) |
|
void | do_list (const Ex &tr, Ex::iterator it, std::function< bool(Ex::iterator)> f) |
| Apply a function on every element of a list, or if the iterator 'it' does not point to a list, only on that single element. More...
|
|
int | list_size (const Ex &tr, Ex::iterator it) |
| For lists as defined above for 'do_list', return their size (in case you really need to know the size before iterating over the elements). More...
|
|
Ex::iterator | find_in_subtree (const Ex &tr, Ex::iterator it, std::function< bool(Ex::iterator)> f, bool including_head=true) |
| Returns an iterator to the first element for which 'f' returns 'true', or 'tr.end()'. More...
|
|
Ex::iterator | find_in_list (const Ex &tr, Ex::iterator it, std::function< Ex::iterator(Ex::iterator)> f) |
| Returns an iterator to the first element for which 'f' does not return tr.end(). More...
|
|
Ex | make_list (Ex el) |
| Ensure that the tree is a list, even if it contains only a single element. More...
|
|
template<typename T > |
T::iterator | do_subtree (const T &tr, typename T::iterator it, std::function< typename T::iterator(typename T::iterator)> f) |
| Apply a function on every node in the tree at and below the given node, depth-first. More...
|
|
HashFlags | operator~ (HashFlags flags) |
|
HashFlags | operator| (HashFlags lhs, HashFlags rhs) |
|
HashFlags | operator& (HashFlags lhs, HashFlags rhs) |
|
HashFlags & | operator|= (HashFlags &lhs, HashFlags rhs) |
|
HashFlags & | operator&= (HashFlags &lhs, HashFlags rhs) |
|
Ex_hasher::result_t | hash_ex (Ex::iterator it, HashFlags flags) |
|
bool | hash_compare (Ex::iterator lhs, Ex::iterator rhs, HashFlags flags) |
|
std::string | install_prefix () |
| Return an absolute path to the installation path. More...
|
|
std::ostream & | operator<< (std::ostream &, const NTensor &) |
|
void | pre_clean_dispatch (const Kernel &kernel, Ex &ex, Ex::iterator &it) |
|
void | pre_clean_dispatch_deep (const Kernel &k, Ex &tr) |
|
void | cleanup_updown (const Kernel &k, Ex &, Ex::iterator &it) |
| Cleanup for individual node types. More...
|
|
void | cleanup_rational (const Kernel &, Ex &, Ex::iterator &st) |
|
void | cleanup_frac (const Kernel &, Ex &tr, Ex::iterator &st) |
|
void | cleanup_sqrt (const Kernel &, Ex &tr, Ex::iterator &st) |
|
void | cleanup_prod (const Kernel &, Ex &tr, Ex::iterator &st) |
|
void | cleanup_sub (const Kernel &, Ex &tr, Ex::iterator &it) |
|
void | cleanup_indexbracket (const Kernel &k, Ex &, Ex::iterator &it) |
| Convert parser output which indicates an indexbracket to an actual indexbracket node. More...
|
|
std::string | replace_all (std::string const &original, std::string const &from, std::string const &to) |
| Replace all occurrances of 'from' with 'to', return result (does not replace in-place). More...
|
|
long | to_long (multiplier_t mul) |
|
double | to_double (multiplier_t mul) |
|
std::string | to_string (long num) |
|
void | multiply (rset_t::iterator &, multiplier_t) |
| Helper functions for manipulation of multipliers. More...
|
|
void | set (rset_t::iterator &num, multiplier_t fac) |
|
void | add (rset_t::iterator &num, multiplier_t fac) |
|
void | zero (rset_t::iterator &num) |
|
void | one (rset_t::iterator &num) |
|
void | flip_sign (rset_t::iterator &num) |
|
void | half (rset_t::iterator &num) |
|
template<typename T > |
bool | is_in (const T &val, const std::initializer_list< T > &list) |
|
void | init_algorithms (py::module &m) |
|
template<class Algo > |
Ex_ptr | apply_algo_base (Algo &algo, Ex_ptr ex, bool deep, bool repeat, unsigned int depth, bool pre_order=false) |
| Generic internal entry point for the Python side to execute a C++ algorithm. More...
|
|
template<class Algo > |
Ex_ptr | apply_algo (Ex_ptr ex, bool deep, bool repeat, unsigned int depth) |
|
template<class Algo , typename Arg1 > |
Ex_ptr | apply_algo (Ex_ptr ex, Arg1 arg1, bool deep, bool repeat, unsigned int depth) |
|
template<class Algo , typename Arg1 , typename Arg2 > |
Ex_ptr | apply_algo (Ex_ptr ex, Arg1 arg1, Arg2 arg2, bool deep, bool repeat, unsigned int depth) |
|
template<class Algo , typename Arg1 , typename Arg2 , typename Arg3 > |
Ex_ptr | apply_algo (Ex_ptr ex, Arg1 arg1, Arg2 arg2, Arg3 arg3, bool deep, bool repeat, unsigned int depth) |
|
template<class Algo , typename... Args, typename... PyArgs> |
void | def_algo (pybind11::module &m, const char *name, bool deep, bool repeat, unsigned int depth, PyArgs... pyargs) |
| Method to declare a Python function with variable number of arguments, and make that call a C++ algorithm as specified in the Algo template parameter. More...
|
|
template<class Algo > |
Ex_ptr | apply_algo_preorder (Ex_ptr ex, bool deep, bool repeat, unsigned int depth) |
|
template<class Algo , typename Arg1 > |
Ex_ptr | apply_algo_preorder (Ex_ptr ex, Arg1 arg1, bool deep, bool repeat, unsigned int depth) |
|
template<class Algo , typename Arg1 , typename Arg2 > |
Ex_ptr | apply_algo_preorder (Ex_ptr ex, Arg1 arg1, Arg2 arg2, bool deep, bool repeat, unsigned int depth) |
|
template<class Algo , typename... Args, typename... PyArgs> |
void | def_algo_preorder (pybind11::module &m, const char *name, bool deep, bool repeat, unsigned int depth, PyArgs... pyargs) |
| Method to declare a Python function with variable number of arguments, and make that call a C++ algorithm as specified in the Algo template parameter. More...
|
|
void | init_algorithms (pybind11::module &m) |
|
bool | Ex_compare (Ex_ptr, Ex_ptr) |
| Comparison operator for Ex objects in Python. More...
|
|
bool | Ex_compare (Ex_ptr one, int other) |
|
Ex_ptr | Ex_add (const Ex_ptr ex1, const ExNode ex2) |
| Add two expressions, adding a top-level '\sum' node if required. More...
|
|
Ex_ptr | Ex_add (const Ex_ptr ex1, const Ex_ptr ex2) |
|
Ex_ptr | Ex_add (const Ex_ptr ex1, const Ex_ptr ex2, Ex::iterator top2) |
|
Ex_ptr | Ex_join (const Ex_ptr ex1, const Ex_ptr ex2) |
|
Ex_ptr | Ex_join (const std::vector< Ex_ptr > &exs) |
|
Ex_ptr | Ex_mul (const Ex_ptr ex1, const Ex_ptr ex2) |
| Multiply two expressions, adding a top-level '\prod' node if required. More...
|
|
Ex_ptr | Ex_mul (const Ex_ptr ex1, const Ex_ptr ex2, Ex::iterator top2) |
|
Ex_ptr | Ex_sub (const Ex_ptr ex1, const ExNode ex2) |
| Subtract two expressions, adding a top-level '\sum' node if required. More...
|
|
Ex_ptr | Ex_sub (const Ex_ptr ex1, const Ex_ptr ex2) |
|
Ex_ptr | Ex_sub (const Ex_ptr ex1, const Ex_ptr ex2, Ex::iterator top2) |
|
Ex_ptr | fetch_from_python (const std::string &nm) |
| Fetch an Ex object from the Python side using its Python identifier. More...
|
|
Ex_ptr | fetch_from_python (const std::string &nm, pybind11::object scope) |
|
std::string | Ex_as_str (Ex_ptr) |
| Generate the Python str() and repr() representation of the Ex object. More...
|
|
std::string | Ex_as_repr (Ex_ptr ex) |
|
std::string | Ex_as_latex (Ex_ptr) |
| The Python 'print' function always calls the 'str' member on objects to be printed. More...
|
|
pybind11::object | Ex_as_sympy (Ex_ptr) |
| Outputs a Cadabra 'Ex' as a Sympy expression. More...
|
|
pybind11::object | ExNode_as_sympy (const ExNode &exnode) |
|
std::string | 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 | Ex_as_input (Ex_ptr ex) |
|
std::string | Ex_as_MMA (Ex_ptr ex, bool use_unicode) |
|
Ex_comparator::match_t | ExNode_compare (const ExNode &lhs, const ExNode &rhs, const std::string &use_props, bool ignore_parent_rel) |
|
std::string | print_tree (Ex *ex) |
|
Ex | lhs (Ex_ptr ex) |
|
Ex | rhs (Ex_ptr ex) |
|
Ex | Ex_getslice (Ex_ptr ex, pybind11::slice slice) |
|
Ex | Ex_getitem (Ex &ex, int index) |
|
void | Ex_setitem (Ex_ptr ex, int index, Ex val) |
|
void | Ex_setitem_iterator (Ex_ptr ex, ExNode en, Ex_ptr val) |
|
size_t | Ex_len (Ex_ptr ex) |
|
long | Ex_int_cast (Ex_ptr ex) |
|
std::string | Ex_head (Ex_ptr ex) |
|
pybind11::object | Ex_get_mult (Ex_ptr ex) |
|
pybind11::list | terms (Ex_ptr ex) |
|
std::shared_ptr< sympy::SympyBridge > | SympyBridge_init (std::shared_ptr< Ex > ex) |
|
Ex_ptr | Ex_from_string (const std::string &ex_, bool, Kernel *kernel) |
|
Ex_ptr | Ex_from_int (int num, bool) |
|
void | call_post_process (Kernel &kernel, Ex_ptr ex) |
|
void | Ex_cleanup (Ex_ptr ex) |
|
Ex_ptr | map_sympy_wrapper (Ex_ptr ex, std::string head, pybind11::args args) |
|
void | init_ex (py::module &m) |
|
std::string | Ex_as_tree (Ex *ex) |
|
void | init_ex (pybind11::module &m) |
|
py::object | get_locals () |
|
py::object | get_globals () |
|
bool | scope_has (const py::dict &dict, const std::string &obj) |
|
std::string | install_prefix_of_module () |
|
std::string | read_manual (pybind11::module &m, const char *category, const char *name) |
|
bool | scope_has (const pybind11::dict &dict, const std::string &obj) |
|
Kernel * | create_scope () |
| Setup of kernels in current scope, callable from Python. More...
|
|
Kernel * | create_scope_from_global () |
|
Kernel * | create_empty_scope () |
|
Kernel * | get_kernel_from_scope () |
| Get a pointer to the currently visible kernel. More...
|
|
void | kernel_configure_warnings (Kernel &kernel, pybind11::kwargs kwargs) |
|
void | init_kernel (pybind11::module &m) |
|
void | init_media (py::module &m) |
|
void | init_media (pybind11::module &m) |
|
std::string | init_ipython () |
|
| PYBIND11_MODULE (cadabra2, m) |
|
void | init_ntensor (py::module &m) |
|
void | init_ntensor (pybind11::module &m) |
|
void | compile_package (const std::string &in_name, const std::string &out_name) |
| Convert a Cadabra notebook file to a python package which can be imported using standard 'import' notation. More...
|
|
void | init_packages (pybind11::module &m) |
|
py::list | ProgressMonitor_totals_helper (ProgressMonitor &self) |
|
ProgressMonitor * | get_progress_monitor () |
|
void | init_progress_monitor (py::module &m) |
|
void | init_progress_monitor (pybind11::module &m) |
|
template<typename BoundPropT > |
BoundPropT::py_type | def_abstract_prop (pybind11::module &m, const std::string &name) |
|
template<typename BoundPropT > |
BoundPropT::py_type | def_prop (pybind11::module &m) |
|
pybind11::list | list_properties () |
|
std::vector< Ex > | indices_get_all (const Indices *indices, bool include_wildcards) |
|
Ex | indices_get_dummy (const Indices *indices, const Ex_ptr &ex) |
|
void | init_properties (py::module &m) |
|
template<typename PropT > |
std::string | get_name () |
|
template<typename BoundPropT > |
BoundPropT::py_type | def_abstract_prop (pybind11::module &m) |
|
void | init_properties (pybind11::module &m) |
|
void | init_stopwatch (py::module &m) |
|
void | init_stopwatch (pybind11::module &m) |
|
std::string | tab_str (const tab_t &tab) |
|
void | init_tableau (pybind11::module &m) |
|
std::string | capitalize_first (std::string in) |
|
Functions to handle the exchange properties of two or more symbols in a product.
NotebookCanvas is an actual view on the document.
Evaluate a tensorial expression to components, performing all dummy index sums.
Handle the entire preclean stage, which turns a parsed expression into an expression which satisfies the Cadabra conventions.
Class to hold numerical values structured in tensor form, that is, a multi-dimensional array.
Cadabra kernel that keeps all state information that needs to be passed around to algorithms and properties.
Class to deal with index scanning and classification.
This module is only concerned with the exchange properties of tensors as a whole, not with index permutation symmetries (which are handled in the canonicalise class of algebra.cc).
Stores property information and global settings.
This does not involve the property system.
- All numerical multipliers in a product on the product node, no multiplier on a sum node or on the comma node.
- Any '\frac' nodes with a purely numerical denominator should be rewritten as a rational multiplier for the numerator node.
- Any \sub nodes get converted to \sum nodes.
See tests/components.cdb for basic samples.
Components nodes have the following structure:
\components_{a b ... n}({t,t,...r}=value, {t,t,...r}=value, ...)
\verbatim
\components
_{m} // index names/types
_{n}
\comma // last child
\equals
\comma // list of index values
r
t
[value] // value of tensor for above values of indices
\equals
...
\equals
...
ex:= A_{m n} ( A_{m n} + B_{m n} );
crds:= m -> { t, r, \phi, \theta };
vals:= { A_{t t} -> r, A_{r r} -> r**2, A_{t \phi} -> t, B_{t t} -> 1 };
evaluate(ex, crds, vals);
tst:= r * ( r + 1 ) + r**2 * r**2 + t*t - @(ex);
The algorithm performs the following steps. First, all free and dummy indices are classified using members of Algorithm (maybe later?). For all indices, the 'crds' argument to the algorithm is scanned for a
\verbatim
m -> { a,b,c }
type pattern.
Do a dept-first scan until the first sum or product node.
In a sum node, all terms must have the same index structure, so we can now make a map from the subtree pattern to all possible index values. For each such index value set, lookup if there is a replacement pattern, if not replace by zero. This map can be reused later for equal sub-expressions (here it is important that a normal tensor expression can be used as a pattern immediately, though I would search both on explicit iterator (for things that we have just seen) and on pattern (for things that occur again later in the tree)).
In a product node, find all dummies and free indices. Create a set of all index value sets, e.g.
\verbatim
{m, n, p} ->
{ {t, t, t}, {r,t,t}, {t,r,t}, ... }
For each such index value set, lookup replacement rules.
KEY: quick way to lookup, for a given set of index values on a (found) pattern/pattern pointed to by iterator, whether and what is the value of the pattern.
There can be any number of them active inside the NotebookWindow. Each DataCell in the notebook document has a corresponding VisualCell in the NotebookCanvas, which gets added by NotebookCanvas::add_cell.
Cells which contain child cells (e.g. CodeInput, which can contain child cells corresponding to the TeXView output) will also be hierarchically ordered in the visual tree. That is, any visual cell which can contain a child cell will have it stored inside a Gtk::Box inside the visual cell. Removing any cell will therefore also immediately remove the child cells.