4 #include "../Settings.h"
11 namespace projection_compare {
13 template<
typename Poly>
14 using Candidate = std::tuple<const Poly&, const Poly&, std::size_t>;
15 template<
typename Poly>
17 return os <<
"(" << std::get<0>(c) <<
", " << std::get<1>(c) <<
" on " << std::get<2>(c) <<
")";
24 template<
typename Poly>
26 return std::get<2>(c);
28 template<
typename Poly>
32 template<
typename Poly>
34 if (&std::get<0>(c) == &std::get<1>(c))
return 0;
42 template<
typename Poly,
typename tag,
typename F>
47 SMTRAT_LOG_TRACE(
"smtrat.cad.projectioncompare",
"Comparing " << l <<
" < " << r <<
" -> 0");
50 SMTRAT_LOG_TRACE(
"smtrat.cad.projectioncompare",
"Comparing " << l <<
" < " << r <<
" ? " << (f(l, r) ? -1 : 1));
51 return f(l, r) ? -1 : 1;
54 template<
typename Poly>
58 template<
typename Poly,
typename tag,
typename F,
typename... Tail>
61 if (res != 0)
return res > 0;
65 template<
typename... Args>
67 template<
typename Poly>
70 SMTRAT_LOG_TRACE(
"smtrat.cad.projectioncompare", lhs <<
" < " << rhs <<
" ? " << res);
75 using lt = std::less<>;
76 using gt = std::greater<>;
78 template<ProjectionCompareStrategy Strategy>
101 template<
typename Poly>
std::size_t complexity(const std::vector< FormulaT > &origin)
std::tuple< const Poly &, const Poly &, std::size_t > Candidate
auto get(const Candidate< Poly > &c, level)
int compareCriterion(const Candidate< Poly > &lhs, const Candidate< Poly > &rhs, tag t, F &&f)
Compares the criterion given by t of two samples lhs and rhs using a comparator f.
bool compare(const Candidate< Poly > &lhs, const Candidate< Poly > &rhs)
std::ostream & operator<<(std::ostream &os, const Candidate< Poly > &c)
projection_compare::Candidate< Poly > candidate(const Poly &p, const Poly &q, std::size_t level)
ProjectionCompareStrategy
Class to create the formulas for axioms.
carl::MultivariatePolynomial< Rational > Poly
#define SMTRAT_LOG_TRACE(channel, msg)
bool operator()(const Candidate< Poly > &lhs, const Candidate< Poly > &rhs) const