SMT-RAT  24.02
Toolbox for Strategic and Parallel Satisfiability-Modulo-Theories Solving
PolyTree.cpp
Go to the documentation of this file.
1 /**
2  * @file PolyTree.cpp
3  * @author Andreas Krueger <andreas.krueger@rwth-aachen.de>
4  */
5 
6 #include "PolyTreePool.h"
7 #include "PolyTree.h"
8 
9 namespace smtrat
10 {
11  PolyTree::PolyTree(const Poly& _poly) :
12  mpContent(PolyTreePool::getInstance().get(_poly))
13  { }
14 
15  const PolyTree& PolyTree::left() const {
16  assert(mpContent->mLeft);
17  return *(mpContent->mLeft);
18  }
19 
20  const PolyTree& PolyTree::right() const {
21  assert(mpContent->mRight);
22  return *(mpContent->mRight);
23  }
24 
25  carl::Variable::Arg PolyTree::variable() const {
26  assert(mpContent->mType == Type::VARIABLE);
27  return mpContent->mVariable;
28  }
29 
30  const Integer& PolyTree::constant() const {
31  assert(mpContent->mType == Type::CONSTANT);
32  return mpContent->mConstant;
33  }
34 
36  return mpContent->mType;
37  }
38 
39  const Poly& PolyTree::poly() const {
40  return mpContent->mPoly;
41  }
42 } // namespace smtrat
PolyTree::Type mType
Definition: PolyTree.h:43
carl::Variable mVariable
Definition: PolyTree.h:46
std::optional< PolyTree > mRight
Definition: PolyTree.h:50
std::optional< PolyTree > mLeft
Definition: PolyTree.h:49
const Poly & poly() const
Definition: PolyTree.cpp:39
const PolyTreeContent * mpContent
Definition: PolyTree.h:22
const PolyTree & left() const
Definition: PolyTree.cpp:15
carl::Variable::Arg variable() const
Definition: PolyTree.cpp:25
const PolyTree & right() const
Definition: PolyTree.cpp:20
PolyTree(const Poly &_poly)
Definition: PolyTree.cpp:11
const Integer & constant() const
Definition: PolyTree.cpp:30
Type type() const
Definition: PolyTree.cpp:35
auto get(const It &it, level)
Class to create the formulas for axioms.
carl::MultivariatePolynomial< Rational > Poly
Definition: types.h:25
carl::IntegralType< Rational >::type Integer
Definition: types.h:21