11 std::vector<carl::Variable>
vars;
12 for (
const auto& el : a) {
14 vars.insert(
vars.end(), el_vars.begin(), el_vars.end());
22 std::size_t a_max_max_total_degree = 0;
23 for (
const auto& el : a) {
24 a_max_max_total_degree = std::max(a_max_max_total_degree, proj.
total_degree(el.lhs));
26 return a_max_max_total_degree;
31 for (
const auto& el : a) {
39 std::size_t count = 0;
40 for (
const auto& el : a) {
46 return static_cast<double>(sum)/
static_cast<double>(count);
51 for (
const auto& el : a) {
60 std::size_t a_sum_max_total_degree = 0;
61 for (
const auto& el : a) {
64 return a_sum_max_total_degree;
69 std::size_t count = 0;
70 for (
const auto& el : a) {
76 return static_cast<double>(sum)/
static_cast<double>(count);
81 for (
const auto& el : a) {
91 for (
const auto& el : a) {
113 if (a_sum_max_degree != b_sum_max_degree)
return a_sum_max_degree < b_sum_max_degree;
117 if (a_avg_avg_degree != b_avg_avg_degree)
return a_avg_avg_degree < b_avg_avg_degree;
121 return a_sum_sum_degree < b_sum_sum_degree;
130 if (a_level != b_level)
return a_level < b_level;
131 else return a.size() < b.size();
135 return a.size() < b.size();
141 inline bool sotd(
cadcells::datastructures::Projections& proj,
const boost::container::flat_set<cadcells::datastructures::PolyConstraint>& a,
const boost::container::flat_set<cadcells::datastructures::PolyConstraint>& b) {
144 return a_sum_sum_total_degree < b_sum_sum_total_degree || (a_sum_sum_total_degree == b_sum_sum_total_degree && a.size() < b.size());
151 if (a_level != b_level)
return a_level < b_level;
152 else return sotd(proj, a, b);
159 if (a_vars != b_vars)
return a_vars < b_vars;
160 else return sotd(proj, a, b);
166 return a_sum_sum_total_degree > b_sum_sum_total_degree || (a_sum_sum_total_degree == b_sum_sum_total_degree && a.size() > b.size());
172 return a_max_max_total_degree < b_max_max_total_degree || (a_max_max_total_degree == b_max_max_total_degree && a.size() < b.size());
Encapsulates all computations on polynomials.
std::size_t degree(PolyRef p) const
const std::vector< std::size_t > & monomial_total_degrees(PolyRef p)
const std::vector< std::size_t > & monomial_degrees(PolyRef p)
std::size_t total_degree(PolyRef p)
std::vector< carl::Variable > variables(PolyRef p)
void sort(T *array, int size, LessThan lt)
std::vector< carl::Variable > vars(const std::pair< QuantifierType, std::vector< carl::Variable >> &p)