Cadabra
Computer algebra system for field theory problems
eliminate_metric.hh
Go to the documentation of this file.
1 
2 #pragma once
3 
4 #include "Algorithm.hh"
5 #include "IndexIterator.hh"
6 
7 namespace cadabra {
8 
9  class eliminate_converter : public Algorithm {
10  public:
11  eliminate_converter(const Kernel&, Ex&, Ex&, bool);
12 
13  virtual bool can_apply(iterator) override;
14  virtual result_t apply(iterator&) override;
15 
16  protected:
17  virtual bool is_conversion_object(iterator) const=0;
18 
19  private:
22  bool redundant;
23 
32  };
33 
34 
36  public:
37  eliminate_metric(const Kernel&, Ex&, Ex&, bool);
38 
39  protected:
40  virtual bool is_conversion_object(iterator) const override;
41  };
42 
43  }
cadabra::Algorithm::sibling_iterator
Ex::sibling_iterator sibling_iterator
Definition: Algorithm.hh:72
Algorithm.hh
cadabra::IndexClassifier::index_map_t
std::multimap< Ex, Ex::iterator, tree_exact_less_for_indexmap_obj > index_map_t
A map from a pattern to the position where it occurs in the tree.
Definition: IndexClassifier.hh:23
cadabra::index_iterator
Definition: IndexIterator.hh:16
cadabra::Kernel
Definition: Kernel.hh:15
cadabra::eliminate_converter::preferred
Ex preferred
Definition: eliminate_metric.hh:20
cadabra::eliminate_converter
Definition: eliminate_metric.hh:9
cadabra::eliminate_converter::can_apply
virtual bool can_apply(iterator) override
Definition: eliminate_metric.cc:30
cadabra::eliminate_converter::ind_dummy
index_map_t ind_dummy
Definition: eliminate_metric.hh:21
cadabra::eliminate_converter::handle_one_index
bool handle_one_index(index_iterator i1, index_iterator i2, iterator fit, sibling_iterator objs)
See if the conversion which turns index 'i1' into index 'i2' can be applied on the expression,...
Definition: eliminate_metric.cc:36
cadabra::eliminate_converter::is_conversion_object
virtual bool is_conversion_object(iterator) const =0
IndexIterator.hh
cadabra::eliminate_metric
Definition: eliminate_metric.hh:35
cadabra::eliminate_converter::eliminate_converter
eliminate_converter(const Kernel &, Ex &, Ex &, bool)
Definition: eliminate_metric.cc:25
cadabra::Algorithm::iterator
Ex::iterator iterator
Definition: Algorithm.hh:70
cadabra::eliminate_converter::apply
virtual result_t apply(iterator &) override
Definition: eliminate_metric.cc:105
cadabra::eliminate_converter::redundant
bool redundant
Definition: eliminate_metric.hh:22
cadabra::Algorithm
Definition: Algorithm.hh:59
cadabra
Functions to handle the exchange properties of two or more symbols in a product.
Definition: Adjform.cc:83
cadabra::Ex
Definition: Storage.hh:140
cadabra::eliminate_converter::ind_free
index_map_t ind_free
Definition: eliminate_metric.hh:21
cadabra::eliminate_metric::eliminate_metric
eliminate_metric(const Kernel &, Ex &, Ex &, bool)
Definition: eliminate_metric.cc:11
cadabra::Ex::result_t
result_t
Keeping track of what algorithms have done to this expression.
Definition: Storage.hh:159
cadabra::eliminate_metric::is_conversion_object
virtual bool is_conversion_object(iterator) const override
Definition: eliminate_metric.cc:16