Cadabra
Computer algebra system for field theory problems
expand_dummies.hh
Go to the documentation of this file.
1 
2 #pragma once
3 
4 #include <set>
5 #include "Algorithm.hh"
6 
7 namespace cadabra {
8 
9  class expand_dummies : public Algorithm {
10  public:
11  expand_dummies(const Kernel& kernel, Ex& ex, const Ex* components = nullptr, bool zero_missing_components = true);
12 
13  virtual bool can_apply(iterator) override;
14  virtual result_t apply(iterator&) override;
15 
16  private:
17  void enumerate_patterns();
18  void fill_components(Ex::iterator it);
19 
21  const Ex* components;
22  std::vector<Ex> component_patterns;
24  };
25 
26  }
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
A generic tree comparison class which will take into account index contractions and will also keep tr...
Definition: Compare.hh:192
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
const Kernel & kernel
Definition: IndexClassifier.hh:76
Definition: Kernel.hh:15
Definition: expand_dummies.hh:9
void enumerate_patterns()
Definition: expand_dummies.cc:22
std::vector< Ex > component_patterns
Definition: expand_dummies.hh:22
bool zero_missing_components
Definition: expand_dummies.hh:23
void fill_components(Ex::iterator it)
Definition: expand_dummies.cc:143
virtual result_t apply(iterator &) override
Definition: expand_dummies.cc:81
const Ex * components
Definition: expand_dummies.hh:21
expand_dummies(const Kernel &kernel, Ex &ex, const Ex *components=nullptr, bool zero_missing_components=true)
Definition: expand_dummies.cc:13
Ex_comparator comp
Definition: expand_dummies.hh:20
virtual bool can_apply(iterator) override
Definition: expand_dummies.cc:56
Functions to handle the exchange properties of two or more symbols in a product.
Definition: Adjform.cc:83