Cadabra Computer algebra system for field theory problems
collect_terms.hh
Go to the documentation of this file.
1
2 #pragma once
3
4 #include "Algorithm.hh"
5
6 namespace cadabra {
7
11
12  class collect_terms : public Algorithm {
13  public:
14  collect_terms(const Kernel&, Ex&);
15
16  virtual bool can_apply(iterator);
17  virtual result_t apply(iterator&);
18
19  void fill_hash_map(iterator);
21  private:
24
25  typedef std::multimap<hashval_t, sibling_iterator> term_hash_t;
26  typedef term_hash_t::iterator term_hash_iterator_t;
27
29  };
30
31  }
Base class for all algorithms, containing generic routines and in particular the logic for index clas...
Definition: Algorithm.hh:59
Ex::iterator iterator
Definition: Algorithm.hh:70
Ex::sibling_iterator sibling_iterator
Definition: Algorithm.hh:72
Basic storage class for symbolic mathemematical expressions.
Definition: Storage.hh:142
result_t
Keeping track of what algorithms have done to this expression.
Definition: Storage.hh:163
Definition: Kernel.hh:15
Collect symbolically equal terms in a sum.
Definition: collect_terms.hh:12
term_hash_t::iterator term_hash_iterator_t
Definition: collect_terms.hh:26
void remove_zeroed_terms(sibling_iterator, sibling_iterator)
Definition: collect_terms.cc:32
virtual result_t apply(iterator &)
Definition: collect_terms.cc:52
result_t collect_from_hash_map()
Definition: collect_terms.cc:78
void fill_hash_map(iterator)
Definition: collect_terms.cc:18
term_hash_t term_hash
Definition: collect_terms.hh:28
virtual bool can_apply(iterator)
Definition: collect_terms.cc:11
collect_terms(const Kernel &, Ex &)
Definition: collect_terms.cc:6
std::multimap< hashval_t, sibling_iterator > term_hash_t
Definition: collect_terms.hh:25
Functions to handle the exchange properties of two or more symbols in a product.
Definition: Adjform.cc:83