Cadabra
Computer algebra system for field theory problems
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
drop_weight.hh
Go to the documentation of this file.
1 
2 #pragma once
3 
4 #include "Algorithm.hh"
6 #include "properties/Weight.hh"
7 #include <string>
8 
9 namespace cadabra {
10 
11 class drop_keep_weight : public Algorithm {
12  public:
13  drop_keep_weight(const Kernel&, Ex&, Ex&);
14 
15  virtual bool can_apply(iterator) override;
16  result_t do_apply(iterator&, bool keepthem);
17 
18  protected:
21  const Weight *wgh;
22  std::string label;
24 };
25 
26 class drop_weight : public drop_keep_weight {
27  public:
28  drop_weight(const Kernel&, Ex&, Ex&);
29 
30  virtual result_t apply(iterator&) override;
31 };
32 
33 class keep_weight : public drop_keep_weight {
34  public:
35  keep_weight(const Kernel&, Ex&, Ex&);
36 
37  virtual result_t apply(iterator&) override;
38 };
39 
40 }
drop_weight(const Kernel &, Ex &, Ex &)
Definition: drop_weight.cc:124
Base class for all algorithms, containing generic routines and in particular the logic for index clas...
Definition: Algorithm.hh:58
Basic storage class for symbolic mathemematical expressions.
Definition: Storage.hh:130
Ex arg
Definition: drop_weight.hh:19
Definition: Weight.hh:8
virtual result_t apply(iterator &) override
Definition: drop_weight.cc:129
std::string label
Definition: drop_weight.hh:22
Definition: drop_weight.hh:26
Ex::iterator iterator
Definition: Algorithm.hh:69
keep_weight(const Kernel &, Ex &, Ex &)
Definition: drop_weight.cc:134
multiplier_t weight
Definition: drop_weight.hh:23
Definition: drop_weight.hh:11
Definition: WeightInherit.hh:9
result_t do_apply(iterator &, bool keepthem)
Definition: drop_weight.cc:58
mpq_class multiplier_t
Definition: Storage.hh:38
virtual bool can_apply(iterator) override
Definition: drop_weight.cc:29
virtual result_t apply(iterator &) override
Definition: drop_weight.cc:139
const Weight * wgh
Definition: drop_weight.hh:21
drop_keep_weight(const Kernel &, Ex &, Ex &)
Definition: drop_weight.cc:10
Definition: Kernel.hh:15
const WeightInherit * gmn
Definition: drop_weight.hh:20
result_t
Keeping track of what algorithms have done to this expression.
Definition: Storage.hh:149
Definition: drop_weight.hh:33