Cadabra
Computer algebra system for field theory problems
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
integrate_by_parts.hh
Go to the documentation of this file.
1 
2 
3 #pragma once
4 
5 #include "Algorithm.hh"
6 
7 namespace cadabra {
8 
12 
13 
14 class integrate_by_parts : public Algorithm {
15  public:
16  integrate_by_parts(const Kernel&, Ex&, Ex&);
17 
18  virtual bool can_apply(iterator) override;
19  virtual result_t apply(iterator&) override;
20 
21  private:
22  // Integrate by parts on a single term in the integrand. First
23  // argument points to the integral, second to a term in the
24  // integrand.
26 
27  // Are the given integral and derivative inverses of each-other?
28  bool int_and_derivative_related(iterator int_it, iterator der_it) const;
29 
30  // Wrap the indicated range of factor nodes inside the product node in
31  // the derivative.
33 
34  // Determine whether the indicated derivative acts on the 'away_from'
35  // expression.
36  bool derivative_acting_on_arg(iterator der_it) const;
37 
38  // Expression to move derivative away from.
40 };
41 
42 }
Ex away_from
Definition: integrate_by_parts.hh:39
result_t handle_term(iterator, iterator &)
Definition: integrate_by_parts.cc:81
Base class for all algorithms, containing generic routines and in particular the logic for index clas...
Definition: Algorithm.hh:58
Integrate by parts away from the indicated derivative object.
Definition: integrate_by_parts.hh:14
integrate_by_parts(const Kernel &, Ex &, Ex &)
Definition: integrate_by_parts.cc:9
Basic storage class for symbolic mathemematical expressions.
Definition: Storage.hh:130
virtual bool can_apply(iterator) override
Definition: integrate_by_parts.cc:14
Ex wrap(iterator, sibling_iterator, sibling_iterator) const
Definition: integrate_by_parts.cc:210
virtual result_t apply(iterator &) override
Definition: integrate_by_parts.cc:20
Ex::iterator iterator
Definition: Algorithm.hh:69
Ex::sibling_iterator sibling_iterator
Definition: Algorithm.hh:71
bool int_and_derivative_related(iterator int_it, iterator der_it) const
Definition: integrate_by_parts.cc:57
Definition: Kernel.hh:15
result_t
Keeping track of what algorithms have done to this expression.
Definition: Storage.hh:149
bool derivative_acting_on_arg(iterator der_it) const
Definition: integrate_by_parts.cc:62