20 template<
typename Settings>
48 carl::Relation
combine(carl::Relation lhs, carl::Relation rhs, std::size_t exponent) {
49 assert(lhs != carl::Relation::NEQ);
50 assert(rhs != carl::Relation::NEQ);
52 if (exponent % 2 == 0) {
53 if (rhs == carl::Relation::LEQ) rhs = carl::Relation::GEQ;
54 else if (rhs == carl::Relation::LESS) rhs = carl::Relation::GREATER;
57 case carl::Relation::GREATER:
return rhs;
58 case carl::Relation::GEQ:
60 case carl::Relation::GREATER:
61 case carl::Relation::GEQ:
return carl::Relation::GEQ;
62 case carl::Relation::LEQ:
63 case carl::Relation::LESS:
return carl::Relation::LEQ;
64 default:
return carl::Relation::NEQ;
67 case carl::Relation::LEQ:
69 case carl::Relation::GREATER:
70 case carl::Relation::GEQ:
return carl::Relation::LEQ;
71 case carl::Relation::LEQ:
72 case carl::Relation::LESS:
return carl::Relation::GEQ;
73 default:
return carl::Relation::NEQ;
75 case carl::Relation::LESS:
77 case carl::Relation::GREATER:
return carl::Relation::LESS;
78 case carl::Relation::GEQ:
return carl::Relation::LEQ;
79 case carl::Relation::LEQ:
return carl::Relation::GEQ;
80 case carl::Relation::LESS:
return carl::Relation::GREATER;
81 default:
return carl::Relation::NEQ;
83 case carl::Relation::NEQ:
return carl::Relation::NEQ;
85 return carl::Relation::NEQ;
88 Poly getPoly(
const std::vector<Factorization::const_iterator>& its)
const {
90 for (
const auto& it: its) res *= carl::pow(it->first, it->second);
96 if (bound.second.is_point_interval()) {
105 for (
auto var: carl::variables(p)) {
106 if (res.find(
var) == res.end()) {
107 res[
var] = RationalInterval::unbounded_interval();
All preprocessing modules shall derive from this module, that is modules, which simplify their receiv...
std::pair< ModuleInput::iterator, bool > addSubformulaToPassedFormula(const FormulaT &_formula)
Adds the given formula to the passed formula with no origin.
PFEModule(const ModuleInput *_formula, Conditionals &_conditionals, Manager *_manager=NULL)
FormulaT implyDefinitenessFromStrict(const FormulaT &formula)
std::function< FormulaT(FormulaT)> implyDefinitenessFunction
std::function< FormulaT(FormulaT)> removeFactorsFunction
FormulaT implyDefiniteness(const FormulaT &formula)
void generateVariableAssignments()
FormulaT removeSquares(const FormulaT &formula)
vb::VariableBounds< FormulaT > varbounds
Collection of bounds of all received formulas.
Answer checkCore()
Checks the received formula for consistency.
EvalRationalIntervalMap completeBounds(const Poly &p) const
std::function< FormulaT(FormulaT)> removeSquaresFunction
Poly getPoly(const std::vector< Factorization::const_iterator > &its) const
void removeCore(ModuleInput::const_iterator)
bool addCore(ModuleInput::const_iterator)
FormulaT removeFactors(const FormulaT &formula)
Removes redundant or obsolete factors of polynomials from the formula.
carl::Relation combine(carl::Relation lhs, carl::Relation rhs, std::size_t exponent)
FormulaT removeSquaresFromStrict(const FormulaT &formula)
const EvalRationalIntervalMap & getEvalIntervalMap() const
Creates an evalintervalmap corresponding to the variable bounds.
std::vector< T > getOriginsOfBounds(const carl::Variable &_var) const
Class to create the formulas for axioms.
carl::Formula< Poly > FormulaT
const settings::Settings & Settings()
std::map< carl::Variable, RationalInterval > EvalRationalIntervalMap
carl::MultivariatePolynomial< Rational > Poly
Answer
An enum with the possible answers a Module can give.
std::vector< std::atomic_bool * > Conditionals
A vector of atomic bool pointers.
carl::Formulas< Poly > FormulasT