Cadabra Computer algebra system for field theory problems
sym.hh
Go to the documentation of this file.
1 #pragma once
2
3 #include "Algorithm.hh"
4 #include <vector>
5 #include "Combinatorics.hh"
6
8
9  class sym : virtual public Algorithm {
10  public:
11  sym(const Kernel&, Ex&, Ex&, bool sign);
12  sym(const Kernel&, Ex&, const std::vector<unsigned int>&, bool sign);
13
14  virtual bool can_apply(iterator) override;
15  virtual result_t apply(iterator& it) override;
16
17  protected:
19  bool sign;
20
21  std::vector<unsigned int> slotloc;
22  std::vector<unsigned int> argloc_2_treeloc;
24
25  result_t doit(iterator&, bool);
26  };
27
28  }
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
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:161
Definition: Kernel.hh:15
Definition: sym.hh:9
sym(const Kernel &, Ex &, Ex &, bool sign)
Definition: sym.cc:16
virtual bool can_apply(iterator) override
Definition: sym.cc:23
std::vector< unsigned int > argloc_2_treeloc
Definition: sym.hh:22
bool sign
Definition: sym.hh:19
virtual result_t apply(iterator &it) override
Definition: sym.cc:74
Ex objects
Definition: sym.hh:18
combin::combinations< unsigned int > raw_ints
Definition: sym.hh:23
std::vector< unsigned int > slotloc
Definition: sym.hh:21
result_t doit(iterator &, bool)
Definition: sym.cc:90
Functions to handle the exchange properties of two or more symbols in a product.