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  }
Algorithm.hh
cadabra::expand_dummies::fill_components
void fill_components(Ex::iterator it)
Definition: expand_dummies.cc:143
cadabra::Kernel
Definition: Kernel.hh:15
cadabra::expand_dummies::components
const Ex * components
Definition: expand_dummies.hh:21
cadabra::expand_dummies::expand_dummies
expand_dummies(const Kernel &kernel, Ex &ex, const Ex *components=nullptr, bool zero_missing_components=true)
Definition: expand_dummies.cc:13
cadabra::Ex_comparator
Definition: Compare.hh:192
cadabra::expand_dummies::apply
virtual result_t apply(iterator &) override
Definition: expand_dummies.cc:81
cadabra::Algorithm::iterator
Ex::iterator iterator
Definition: Algorithm.hh:70
cadabra::expand_dummies::can_apply
virtual bool can_apply(iterator) override
Definition: expand_dummies.cc:56
cadabra::Algorithm
Definition: Algorithm.hh:59
cadabra::expand_dummies::enumerate_patterns
void enumerate_patterns()
Definition: expand_dummies.cc:22
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::expand_dummies::zero_missing_components
bool zero_missing_components
Definition: expand_dummies.hh:23
cadabra::expand_dummies::component_patterns
std::vector< Ex > component_patterns
Definition: expand_dummies.hh:22
cadabra::expand_dummies::comp
Ex_comparator comp
Definition: expand_dummies.hh:20
cadabra::IndexClassifier::kernel
const Kernel & kernel
Definition: IndexClassifier.hh:76
cadabra::Ex::result_t
result_t
Keeping track of what algorithms have done to this expression.
Definition: Storage.hh:159
cadabra::expand_dummies
Definition: expand_dummies.hh:9