Cadabra
Computer algebra system for field theory problems
Cleanup.hh
Go to the documentation of this file.
1 /*
2 
3  Cadabra: a field-theory motivated computer algebra system.
4  Copyright (C) 2001-2014 Kasper Peeters <kasper.peeters@phi-sci.com>
5 
6 This program is free software: you can redistribute it and/or
7 modify it under the terms of the GNU General Public License as
8  published by the Free Software Foundation, either version 3 of the
9 License, or (at your option) any later version.
10 
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 General Public License for more details.
15 
16 You should have received a copy of the GNU General Public License
17  along with this program. If not, see <http://www.gnu.org/licenses/>.
18 
19 */
20 
21 
22 #pragma once
23 
24 #include "Storage.hh"
25 #include "Kernel.hh"
26 
27 namespace cadabra {
28 
29  typedef void (*dispatcher_t)(const Kernel& k, Ex&, Ex::iterator& it);
30 
47 
48  void cleanup_dispatch(const Kernel& k, Ex&, Ex::iterator& it);
49 
54 
56  void cleanup_dispatch_deep(const Kernel& k, Ex&, Ex::iterator& it, dispatcher_t disp=&cleanup_dispatch);
57 
67 
68  bool cleanup_fraclike(const Kernel& k, Ex&, Ex::iterator& it);
69  bool cleanup_powlike(const Kernel& k, Ex&, Ex::iterator& it);
70  bool cleanup_productlike(const Kernel& k, Ex&, Ex::iterator& it);
71  bool cleanup_sumlike(const Kernel& k, Ex&, Ex::iterator& it);
72  bool cleanup_derivative(const Kernel& k, Ex&, Ex::iterator& it);
73  bool cleanup_partialderivative(const Kernel& k, Ex&, Ex::iterator& it);
74  bool cleanup_components(const Kernel& k, Ex&, Ex::iterator& it);
75  bool cleanup_numericalflat(const Kernel& k, Ex&, Ex::iterator& it);
76  bool cleanup_diagonal(const Kernel& k, Ex&, Ex::iterator& it);
77  bool cleanup_kronecker(const Kernel& k, Ex&, Ex::iterator& it);
78  bool cleanup_exterior_derivative(const Kernel& k, Ex&, Ex::iterator& it);
79 
88 
89  bool push_down_multiplier(const Kernel& k, Ex& tr, Ex::iterator it);
90 
93 
94  void check_index_consistency(const Kernel& k, Ex& tr, Ex::iterator it);
95 
96  }
Storage.hh
cadabra::Kernel
Definition: Kernel.hh:14
cadabra::cleanup_exterior_derivative
bool cleanup_exterior_derivative(const Kernel &k, Ex &tr, Ex::iterator &it)
Definition: Cleanup.cc:831
cadabra::cleanup_powlike
bool cleanup_powlike(const Kernel &k, Ex &tr, Ex::iterator &it)
Definition: Cleanup.cc:134
k
int k
Definition: passing.cc:4
cadabra::cleanup_productlike
bool cleanup_productlike(const Kernel &k, Ex &tr, Ex::iterator &it)
Definition: Cleanup.cc:223
cadabra::cleanup_components
bool cleanup_components(const Kernel &k, Ex &tr, Ex::iterator &it)
Definition: Cleanup.cc:554
cadabra::cleanup_dispatch
void cleanup_dispatch(const Kernel &kernel, Ex &tr, Ex::iterator &it)
Definition: Cleanup.cc:22
cadabra::push_down_multiplier
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 allowe...
Definition: Cleanup.cc:508
cadabra::Ex
Definition: Storage.hh:140
cadabra
Functions to handle the exchange properties of two or more symbols in a product.
Definition: Adjform.cc:80
cadabra::cleanup_dispatch_deep
void cleanup_dispatch_deep(const Kernel &k, Ex &tr, dispatcher_t dispatch)
Definition: Cleanup.cc:847
cadabra::cleanup_partialderivative
bool cleanup_partialderivative(const Kernel &, Ex &tr, Ex::iterator &it)
Definition: Cleanup.cc:660
cadabra::cleanup_kronecker
bool cleanup_kronecker(const Kernel &, Ex &tr, Ex::iterator &it)
Definition: Cleanup.cc:805
cadabra::cleanup_diagonal
bool cleanup_diagonal(const Kernel &, Ex &tr, Ex::iterator &it)
Definition: Cleanup.cc:786
Kernel.hh
cadabra::check_index_consistency
void check_index_consistency(const Kernel &k, Ex &tr, Ex::iterator it)
Generic tool to check for index inconsistencies independent of running any algorithm.
Definition: Cleanup.cc:99
cadabra::cleanup_derivative
bool cleanup_derivative(const Kernel &k, Ex &tr, Ex::iterator &it)
Definition: Cleanup.cc:698
cadabra::cleanup_sumlike
bool cleanup_sumlike(const Kernel &k, Ex &tr, Ex::iterator &it)
Definition: Cleanup.cc:387
cadabra::cleanup_fraclike
bool cleanup_fraclike(const Kernel &k, Ex &tr, Ex::iterator &it)
Individual node cleanup routines.
Definition: Cleanup.cc:107
cadabra::dispatcher_t
void(* dispatcher_t)(const Kernel &k, Ex &, Ex::iterator &it)
Definition: Cleanup.hh:29
cadabra::cleanup_numericalflat
bool cleanup_numericalflat(const Kernel &, Ex &tr, Ex::iterator &it)
Definition: Cleanup.cc:751