Cadabra
Computer algebra system for field theory problems
Classes | Namespaces | Functions
Functional.hh File Reference
#include <functional>
#include "Storage.hh"

Go to the source code of this file.

Classes

struct  cadabra::split_it
 
struct  cadabra::split_it::iterator
 

Namespaces

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

Functions

void cadabra::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 cadabra::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 cadabra::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::iterator cadabra::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 cadabra::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 cadabra::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...