Cadabra
Computer algebra system for field theory problems
substitute.hh
Go to the documentation of this file.
1 
2 #pragma once
3 
4 #include "Algorithm.hh"
6 
7 namespace cadabra {
8 
12 
13  class substitute : public Algorithm {
14  public:
15  substitute(const Kernel&, Ex& tr, Ex& args, bool partial=true);
16 
32 
33  virtual bool can_apply(iterator st);
34 
35  virtual result_t apply(iterator&);
36 
38  private:
39  Ex& args;
40 
43 
44  std::map<iterator, bool> lhs_contains_dummies, rhs_contains_dummies;
45 
46  // For object swap testing routines:
48  bool partial;
49  };
50 
51  }
cadabra::Algorithm::iterator
Ex::iterator iterator
Definition: Algorithm.hh:70
cadabra::substitute::comparator
Ex_comparator comparator
Definition: substitute.hh:37
cadabra::substitute::substitute
substitute(const Kernel &, Ex &tr, Ex &args, bool partial=true)
Definition: substitute.cc:16
cadabra::substitute::lhs_contains_dummies
std::map< iterator, bool > lhs_contains_dummies
Definition: substitute.hh:44
cadabra::Kernel
Definition: Kernel.hh:14
Algorithm.hh
cadabra::Ex::result_t
result_t
Keeping track of what algorithms have done to this expression.
Definition: Storage.hh:159
cadabra::substitute
Definition: substitute.hh:13
cadabra::substitute::can_apply
virtual bool can_apply(iterator st)
Match the lhs of the replacement rule to the subtree 'st' under consideration.
Definition: substitute.cc:83
cadabra::substitute::args
Ex & args
Definition: substitute.hh:39
cadabra::substitute::use_rule
iterator use_rule
Definition: substitute.hh:41
cadabra::substitute::rhs_contains_dummies
std::map< iterator, bool > rhs_contains_dummies
Definition: substitute.hh:44
cadabra::substitute::conditions
iterator conditions
Definition: substitute.hh:42
cadabra::substitute::apply
virtual result_t apply(iterator &)
Definition: substitute.cc:145
cadabra::Algorithm
Definition: Algorithm.hh:59
cadabra::sort_product
Definition: sort_product.hh:8
cadabra::Ex
Definition: Storage.hh:140
cadabra::substitute::sort_product_
sort_product sort_product_
Definition: substitute.hh:47
cadabra
Functions to handle the exchange properties of two or more symbols in a product.
Definition: Adjform.cc:80
sort_product.hh
cadabra::Algorithm::tr
Ex & tr
Definition: Algorithm.hh:139
cadabra::substitute::partial
bool partial
Definition: substitute.hh:48
cadabra::Ex_comparator
Definition: Compare.hh:189