Cadabra
Computer algebra system for field theory problems
explicit_indices.hh
Go to the documentation of this file.
1 
2 #pragma once
3 
4 #include "Algorithm.hh"
5 
6 namespace cadabra {
7 
8  class explicit_indices : public Algorithm {
9  public:
10  explicit_indices(const Kernel&, Ex&);
11 
12  virtual bool can_apply(iterator);
13  virtual result_t apply(iterator&);
14 
15  private:
18  std::map<const Indices *, Ex::iterator> index_lines, first_index, last_index; // for the current term
19 
20  void handle_factor(sibling_iterator& factor, bool trace_it);
21  };
22 
23  }
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:164
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
Definition: Kernel.hh:15
Definition: explicit_indices.hh:8
index_map_t ind_dummy_sum
Definition: explicit_indices.hh:16
void handle_factor(sibling_iterator &factor, bool trace_it)
Definition: explicit_indices.cc:168
virtual bool can_apply(iterator)
Definition: explicit_indices.cc:18
std::map< const Indices *, Ex::iterator > last_index
Definition: explicit_indices.hh:18
virtual result_t apply(iterator &)
Definition: explicit_indices.cc:51
index_map_t ind_free_sum
Definition: explicit_indices.hh:16
std::map< const Indices *, Ex::iterator > first_index
Definition: explicit_indices.hh:18
index_map_t added_this_term
Definition: explicit_indices.hh:17
std::map< const Indices *, Ex::iterator > index_lines
Definition: explicit_indices.hh:18
explicit_indices(const Kernel &, Ex &)
Definition: explicit_indices.cc:13
Functions to handle the exchange properties of two or more symbols in a product.
Definition: Adjform.cc:83