Cadabra
Computer algebra system for field theory problems
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
factor_out.hh
Go to the documentation of this file.
1 
2 #pragma once
3 
4 #include "Algorithm.hh"
5 
6 namespace cadabra {
7 
9 
10 class factor_out : public Algorithm {
11  public:
12  factor_out(const Kernel&, Ex&, Ex&, bool right);
13 
14  virtual bool can_apply(iterator) override;
15  virtual result_t apply(iterator&) override;
16 
17  private:
18  bool to_right;
19 
20  typedef std::vector<Ex> to_factor_out_t;
22 };
23 
24 }
Base class for all algorithms, containing generic routines and in particular the logic for index clas...
Definition: Algorithm.hh:58
virtual bool can_apply(iterator) override
Check if the expression is a sum with more than one term.
Definition: factor_out.cc:21
Basic storage class for symbolic mathemematical expressions.
Definition: Storage.hh:130
bool to_right
Definition: factor_out.hh:18
factor_out(const Kernel &, Ex &, Ex &, bool right)
Definition: factor_out.cc:10
to_factor_out_t to_factor_out
Definition: factor_out.hh:21
Ex::iterator iterator
Definition: Algorithm.hh:69
Definition: factor_out.hh:10
virtual result_t apply(iterator &) override
Definition: factor_out.cc:27
Definition: Kernel.hh:15
std::vector< Ex > to_factor_out_t
Definition: factor_out.hh:20
result_t
Keeping track of what algorithms have done to this expression.
Definition: Storage.hh:149