Cadabra
Computer algebra system for field theory problems
WeightInherit.hh
Go to the documentation of this file.
1 
2 #pragma once
3 
4 #include "Exceptions.hh"
6 
7 namespace cadabra {
8 
9  class WeightInherit : virtual public WeightBase {
10  public:
11  // The following exception class is thrown when 'value' cannot figure out the
12  // weight because a sum contains terms of different weight.
14  public:
15  WeightException(const std::string&);
16  };
17 
18  virtual bool parse(Kernel&, std::shared_ptr<Ex>, keyval_t&) override;
19  virtual multiplier_t value(const Kernel&, Ex::iterator, const std::string& forcedlabel) const override;
20  virtual std::string unnamed_argument() const override
21  {
22  return "type";
23  };
24  virtual std::string name() const override;
25 
27 
29  };
30 
31  }
cadabra::WeightInherit::CombinationType
CombinationType
Definition: WeightInherit.hh:26
cadabra::WeightInherit::unnamed_argument
virtual std::string unnamed_argument() const override
Definition: WeightInherit.hh:20
Exceptions.hh
cadabra::WeightInherit::parse
virtual bool parse(Kernel &, std::shared_ptr< Ex >, keyval_t &) override
Definition: WeightInherit.cc:17
cadabra::WeightInherit::power
@ power
Definition: WeightInherit.hh:26
cadabra::Kernel
Definition: Kernel.hh:15
cadabra::WeightInherit::additive
@ additive
Definition: WeightInherit.hh:26
WeightBase.hh
cadabra::WeightInherit::WeightException
Definition: WeightInherit.hh:13
cadabra::WeightInherit::value_self
multiplier_t value_self
Definition: WeightInherit.hh:28
cadabra::WeightInherit::combination_type
enum cadabra::WeightInherit::CombinationType combination_type
ConsistencyException
Definition: Exceptions.hh:14
cadabra::WeightBase
Definition: WeightBase.hh:8
cadabra::WeightInherit
Definition: WeightInherit.hh:9
cadabra::WeightInherit::multiplicative
@ multiplicative
Definition: WeightInherit.hh:26
cadabra::WeightInherit::name
virtual std::string name() const override
Definition: WeightInherit.cc:7
cadabra
Functions to handle the exchange properties of two or more symbols in a product.
Definition: Adjform.cc:83
cadabra::multiplier_t
mpq_class multiplier_t
Definition: Storage.hh:38
cadabra::keyval_t
Arguments to properties get parsed into a keyval_t structure.
Definition: Props.hh:68
cadabra::WeightInherit::WeightException::WeightException
WeightException(const std::string &)
Definition: WeightInherit.cc:12
cadabra::WeightInherit::value
virtual multiplier_t value(const Kernel &, Ex::iterator, const std::string &forcedlabel) const override
Definition: WeightInherit.cc:38