Cadabra
Computer algebra system for field theory problems
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
canonicalise.hh
Go to the documentation of this file.
1 
2 #include "Algorithm.hh"
3 #include "properties/Indices.hh"
4 #include <vector>
5 
6 namespace cadabra {
7 
11 
12  class canonicalise : public Algorithm {
13  public:
14  canonicalise(const Kernel&, Ex&);
15 
16  virtual bool can_apply(iterator);
17  virtual result_t apply(iterator&);
18 
19  std::vector<std::vector<int> > generating_set;
21 
22  private:
23  // Sub-algorithms needed before going to the full fledged canonicaliser.
24  // All return true if they have modified the expression.
27  bool only_one_on_derivative(iterator index1, iterator index2) const;
28 
29  std::string get_index_set_name(iterator) const;
31 // void collect_dummy_info(const index_map_t&, const index_position_map_t&,
32 // std::vector<int>&, std::vector<int>&);
33  };
34 
35 }
Base class for all algorithms, containing generic routines and in particular the logic for index clas...
Definition: Algorithm.hh:58
virtual result_t apply(iterator &)
Definition: canonicalise.cc:135
Basic storage class for symbolic mathemematical expressions.
Definition: Storage.hh:130
position_t
Definition: Indices.hh:20
bool reuse_generating_set
Definition: canonicalise.hh:20
Indices::position_t position_type(iterator) const
Definition: canonicalise.cc:99
std::string get_index_set_name(iterator) const
Definition: canonicalise.cc:107
virtual bool can_apply(iterator)
Definition: canonicalise.cc:22
Ex::iterator iterator
Definition: Algorithm.hh:69
std::vector< std::vector< int > > generating_set
Definition: canonicalise.hh:19
bool only_one_on_derivative(iterator index1, iterator index2) const
Definition: canonicalise.cc:120
bool remove_traceless_traces(iterator &)
Definition: canonicalise.cc:46
Definition: Kernel.hh:15
result_t
Keeping track of what algorithms have done to this expression.
Definition: Storage.hh:149
bool remove_vanishing_numericals(iterator &)
Definition: canonicalise.cc:72
canonicalise(const Kernel &, Ex &)
Definition: canonicalise.cc:17
Canonicalise the index structure of a tensorial expression.
Definition: canonicalise.hh:12