2 #include <carl-common/memory/Singleton.h>
6 using IR = datastructures::IndexedRoot;
19 if (!
apx_settings().crit_considered_count_enabled)
return true;
21 #ifdef SMTRAT_DEVOPTION_Statistics
22 OCApproximationStatistics::get_instance().maxConsideredReached();
30 #ifdef SMTRAT_DEVOPTION_Statistics
31 OCApproximationStatistics::get_instance().maxApxReached();
37 if (!
apx_settings().crit_single_degree_enabled)
return true;
42 if (!
apx_settings().crit_pair_degree_enabled)
return true;
51 if (!
apx_settings().crit_poly_apx_count_enabled)
return true;
54 #ifdef SMTRAT_DEVOPTION_Statistics
56 OCApproximationStatistics::get_instance().apxTooOften();
62 if (!
apx_settings().crit_involved_count_enabled)
return true;
64 for (
const auto& c : constraints) {
78 if (!
apx_settings().crit_side_degree_enabled)
return false;
79 for(
auto it = start; it != end; it++) {
80 for (
const auto& ir_outer : it->second) {
81 if (ir.
poly == ir_outer.root.poly)
continue;
88 void new_cell(
const std::vector<Atom>& constraints) {
97 auto pr = std::make_pair(p, root_index);
104 #ifdef SMTRAT_DEVOPTION_Statistics
106 OCApproximationStatistics::get_instance().involvedTooOften();
112 static bool cell(
const std::vector<Atom>& constraints) {
118 static bool level(std::size_t lvl) {
134 if (
poly(proj, ir))
return true;
Encapsulates all computations on polynomials.
std::size_t degree(PolyRef p) const
static bool cell(const std::vector< Atom > &constraints)
bool crit_considered_count()
std::map< std::pair< Polynomial, std::size_t >, std::size_t > m_poly_apx_counter
friend Singleton< ApxCriteria >
void new_cell(const std::vector< Atom > &constraints)
bool crit_pair_degree(datastructures::Projections &proj, const IR &ir_l, const IR &ir_u)
std::vector< Atom > m_curr_constraints
bool crit_single_degree(datastructures::Projections &proj, const IR &ir)
std::size_t m_considered_count
bool crit_poly_apx_count(datastructures::Projections &proj, const IR &ir)
static bool side(datastructures::Projections &proj, const IR &ir, datastructures::RootMap::const_iterator start, datastructures::RootMap::const_iterator end)
static void inform(const Polynomial &p, std::size_t root_index)
static bool poly_pair(datastructures::Projections &proj, const IR &ir_l, const IR &ir_u)
bool crit_side_degree(datastructures::Projections &proj, const IR &ir, datastructures::RootMap::const_iterator start, datastructures::RootMap::const_iterator end)
bool crit_involved_count(const std::vector< Atom > &constraints)
std::unordered_map< Atom, std::size_t > m_constraint_involved_counter
static bool poly(datastructures::Projections &proj, const IR &ir)
static bool level(std::size_t lvl)
datastructures::IndexedRoot IR
const ApxSettings & apx_settings()
carl::ContextPolynomial< Rational > Polynomial
Represents the i-th root of a multivariate polynomial at its main variable (given an appropriate samp...
PolyRef poly
A multivariate polynomial.
size_t index
The index, must be > 0.
const std::size_t crit_degree_threshold
const std::size_t crit_max_constraint_involved