112 void report_progress(
const std::string&,
int todo,
int done,
int count=2);
166 typedef std::pair<sibling_iterator, sibling_iterator>
range_t;
177 Ex::iterator st, Ex::iterator nd,
178 std::vector<unsigned int>& store);
180 Ex::iterator st, Ex::iterator nd,
181 std::vector<unsigned int>& store);
221 template<
class BinaryPredicate>
255 template<
class BinaryPredicate>
258 BinaryPredicate
fun)
const static bool less_without_numbers(nset_t::iterator, nset_t::iterator)
Definition: Algorithm.cc:1106
range_vector_t::iterator find_arg_superset(range_vector_t &, Iter st, Iter nd)
Definition: Algorithm.cc:801
unsigned int number_of_modifications
Definition: Algorithm.hh:102
Algorithm(const Kernel &, Ex &)
Initialise the algorithm with a reference to the expression tree, but do not yet do anything with thi...
Definition: Algorithm.cc:47
result_t apply_generic(bool deep=true, bool repeat=false, unsigned int depth=0)
The main entry points for running algorithms, which traverse the tree post-order ('child before paren...
Definition: Algorithm.cc:108
bool rename_replacement_dummies(iterator, bool still_inside_algo=false)
Rename the dummies in the sub-tree starting with head at the given iterator.
Definition: Algorithm.cc:652
bool interrupted
Definition: Algorithm.hh:75
bool sum_wrap_single_term(iterator &)
Definition: Algorithm.cc:889
The Stopwach class provides a simple interace to allow timing function calls etc...
Definition: Stopwatch.hh:107
bool separated_by_derivative(iterator, iterator, iterator check_dependence) const
Figure out whether two objects (commonly indices) are separated by a derivative operator, as in .
Definition: Algorithm.cc:943
virtual bool can_apply(iterator)=0
bool check_degree_consistency(iterator) const
Given an expression top node, check differential form degree consistency.
Definition: Algorithm.cc:530
static bool is_factorlike(iterator)
Determines whether the indicated node is 'like a factor in a product'.
Definition: Algorithm.cc:834
bool traverse_ldots
Definition: Algorithm.hh:233
void find_argument_lists(range_vector_t &, bool only_comma_lists=true) const
static bool equal_without_numbers(nset_t::iterator, nset_t::iterator)
Definition: Algorithm.cc:1127
Stopwatch report_progress_stopwatch
Definition: Algorithm.hh:116
bool prod_wrap_single_term(iterator &)
Definition: Algorithm.cc:880
unsigned int number_of_indices(iterator it)
Definition: Algorithm.cc:486
Stopwatch index_sw
Definition: Algorithm.hh:114
static bool is_termlike(iterator)
Determines whether the indicated node is 'like a term in a sum'.
Definition: Algorithm.cc:822
Basic storage class for symbolic mathemematical expressions.
Definition: Storage.hh:140
result_t
Keeping track of what algorithms have done to this expression.
Definition: Storage.hh:159
result_t apply_pre_order(bool repeat=false)
Apply algorithm with alternative traversal: starting from the top node, traverse the tree pre-order (...
Definition: Algorithm.cc:68
Ex::post_order_iterator post_order_iterator
Definition: Algorithm.hh:71
bool is_single_term(iterator)
Take a single non-product node in a sum and wrap it in a product node, so it can be handled on the sa...
Definition: Algorithm.cc:845
void fun(int *&p)
Definition: passing.cc:6
bool sum_unwrap_single_term(iterator &)
Definition: Algorithm.cc:928
void report_progress(const std::string &, int todo, int done, int count=2)
Definition: Algorithm.cc:619
ProgressMonitor * pm
Definition: Algorithm.hh:152
bool is_nonprod_factor_in_prod(iterator)
Definition: Algorithm.cc:864
void node_one(iterator)
Definition: Algorithm.cc:458
Elementary building block for a mathematical expression.
Definition: Storage.hh:55
void node_integer(iterator, int)
Definition: Algorithm.cc:465
std::string get_index_set_name(iterator it) const
Definition: Algorithm.cc:497
An iterator which iterates over indices even if they are at lower levels, i.e.
Definition: IndexIterator.hh:16
unsigned int locate_single_object(Ex::iterator obj_to_find, Ex::iterator st, Ex::iterator nd, std::vector< unsigned int > &store)
Definition: Algorithm.cc:1022
static bool compare_(const str_node &, const str_node &)
Definition: Algorithm.cc:1152
Object keeping track of time spent in nested execution blocks, and keeping track of out-of-band messa...
Definition: ProgressMonitor.hh:16
Ex & tr
Definition: Algorithm.hh:151
bool contains(sibling_iterator from, sibling_iterator to, sibling_iterator arg)
Definition: Algorithm.cc:768
Functions to handle the exchange properties of two or more symbols in a product.
Definition: Adjform.cc:83
std::vector< range_t > range_vector_t
Definition: Algorithm.hh:167
void node_zero(iterator)
Definition: Algorithm.cc:451
index_iterator begin_index(iterator it) const
Definition: Algorithm.cc:510
Stopwatch get_dummy_sw
Definition: Algorithm.hh:115
bool locate_object_set(const Ex &objs, Ex::iterator st, Ex::iterator nd, std::vector< unsigned int > &store)
Definition: Algorithm.cc:1042
bool discard_command_node
Definition: Algorithm.hh:104
void force_node_wrap(iterator &, std::string)
Wrap a term in a product or sum in a node with indicated name, irrespective of its parent (it usually...
Definition: Algorithm.cc:898
virtual result_t apply(iterator &)=0
static unsigned int number_of_direct_indices(iterator it)
Definition: Algorithm.cc:1094
void pushup_multiplier(iterator)
Definition: Algorithm.cc:411
Ex::iterator iterator
Definition: Algorithm.hh:70
std::pair< sibling_iterator, sibling_iterator > range_t
Finding objects in sets.
Definition: Algorithm.hh:166
Definition: IndexClassifier.hh:13
virtual ~Algorithm()
Definition: Algorithm.cc:59
result_t apply_deep(Ex::iterator &it)
Definition: Algorithm.cc:214
Base class for all algorithms, containing generic routines and in particular the logic for index clas...
Definition: Algorithm.hh:59
Ex::result_t result_t
Definition: Algorithm.hh:73
bool prod_unwrap_single_term(iterator &)
Definition: Algorithm.cc:913
int index_parity(iterator) const
Definition: Algorithm.cc:473
Class holding a collection of properties attached to expressions.
Definition: Props.hh:233
bool suppress_normal_output
Definition: Algorithm.hh:103
bool check_consistency(iterator) const
Given an expression top node, check index consistency.
Definition: Algorithm.cc:535
unsigned int intersection_number(sibling_iterator, sibling_iterator, sibling_iterator, sibling_iterator, BinaryPredicate) const
Determine the number of elements in the first range which also occur in the second range...
Definition: Algorithm.hh:256
index_iterator end_index(iterator it) const
Definition: Algorithm.cc:515
Ex::sibling_iterator sibling_iterator
Definition: Algorithm.hh:72
bool check_index_consistency(iterator) const
Definition: Algorithm.cc:523
void propagate_zeroes(post_order_iterator &, const iterator &)
Given a node with zero multiplier, propagate this zero upwards in the tree.
Definition: Algorithm.cc:323
unsigned int number_of_calls
Definition: Algorithm.hh:101
result_t apply_once(Ex::iterator &it)
Definition: Algorithm.cc:197
void set_progress_monitor(ProgressMonitor *)
Provide the algorithm with a ProgressMonitor object on which to register (nested) progress informatio...
Definition: Algorithm.cc:63