SMT-RAT  24.02
Toolbox for Strategic and Parallel Satisfiability-Modulo-Theories Solving
utils.h
Go to the documentation of this file.
1 #pragma once
2 
4 
5 #include <carl-arith/poly/umvpoly/functions/Degree.h>
6 
7 namespace smtrat::analyzer {
8 
10  std::size_t degree_max = 0;
11  std::size_t degree_sum = 0;
12  std::size_t tdegree_max = 0;
13  std::size_t tdegree_sum = 0;
14 
15  void operator()(const Poly& p) {
16  degree_max = std::max(degree_max, carl::total_degree(p));
17  degree_sum += carl::total_degree(p);
18  tdegree_max = std::max(tdegree_max, carl::total_degree(p));
19  tdegree_sum += carl::total_degree(p);
20  }
21  void operator()(const carl::UnivariatePolynomial<Poly>& p) {
22  degree_max = std::max(degree_max, p.degree());
23  degree_sum += p.degree();
24  tdegree_max = std::max(tdegree_max, carl::total_degree(p));
25  tdegree_sum += carl::total_degree(p);
26  }
27  void operator()(const ConstraintT& c) {
28  (*this)(c.lhs());
29  }
30 };
31 
32 }
carl::MultivariatePolynomial< Rational > Poly
Definition: types.h:25
carl::Constraint< Poly > ConstraintT
Definition: types.h:29
void operator()(const Poly &p)
Definition: utils.h:15
void operator()(const carl::UnivariatePolynomial< Poly > &p)
Definition: utils.h:21
void operator()(const ConstraintT &c)
Definition: utils.h:27