Cadabra Computer algebra system for field theory problems
factor_in.hh
Go to the documentation of this file.
1
2 #pragma once
3
4 #include "Algorithm.hh"
5
7
9
10  class factor_in : public Algorithm {
11  public:
12  factor_in(const Kernel&, Ex&, Ex&);
13
14  virtual bool can_apply(iterator) override;
15  virtual result_t apply(iterator&) override;
16
17  protected:
19  std::set<Ex, tree_exact_less_for_indexmap_obj> factnodes; // objects to be taken in brackets;
20  // FIXME: use patterns
21  bool compare_restricted(iterator one, iterator two) const;
22  bool compare_prod_nonprod(iterator prod, iterator nonprod) const;
23
24  // Calculate the hash value excluding factors given in the argument list
26  void fill_hash_map(iterator);
27
28  typedef std::multimap<hashval_t, Ex::sibling_iterator> term_hash_t;
29  typedef term_hash_t::iterator term_hash_iterator_t;
30
32  };
33
34  }
void fill_hash_map(iterator)
Definition: factor_in.cc:56
virtual bool can_apply(iterator) override
Definition: factor_in.cc:17
Algorithm.hh
Definition: Kernel.hh:15
bool compare_restricted(iterator one, iterator two) const
Definition: factor_in.cc:90
bool compare_prod_nonprod(iterator prod, iterator nonprod) const
Definition: factor_in.cc:70
term_hash_t term_hash
Definition: factor_in.hh:31
Ex & factors
Definition: factor_in.hh:18
virtual result_t apply(iterator &) override
Definition: factor_in.cc:123
hashval_t calc_restricted_hash(iterator it) const
Definition: factor_in.cc:31
void one(rset_t::iterator &num)
Definition: Storage.cc:1024
std::set< Ex, tree_exact_less_for_indexmap_obj > factnodes
Definition: factor_in.hh:19
Ex::iterator iterator
Definition: Algorithm.hh:70
Definition: Algorithm.hh:59
Functions to handle the exchange properties of two or more symbols in a product.
Definition: Storage.hh:141
factor_in(const Kernel &, Ex &, Ex &)
Definition: factor_in.cc:12
Definition: factor_in.hh:10