15 template<
typename Rational,
typename Poly,
typename ModelPoly>
18 auto it = m.
find(var);
19 if (it == m.
end())
continue;
23 }
else if (value.
isRAN()) {
24 if (value.
asRAN().is_numeric()) {
28 if constexpr(std::is_same<Poly,ModelPoly>::value) {
31 if (polysub !=
nullptr) {
43 template<
typename Rational,
typename Poly>
52 res = createSubstitution<Rational,Poly,ModelPolynomialSubstitution<Rational,Poly>>(p);
carl is the main namespace for the library.
bool evaluate(const BasicConstraint< Poly > &c, const Assignment< Number > &m)
void evaluate_inplace(ModelValue< Rational, Poly > &res, BVTerm &bvt, const Model< Rational, Poly > &m)
Evaluates a bitvector term to a ModelValue over a Model.
void variables(const BasicConstraint< Pol > &c, carlVariables &vars)
void substitute_inplace(MultivariateRoot< Poly > &mr, Variable var, const Poly &poly)
Create a copy of the underlying polynomial with the given variable replaced by the given polynomial.
Assignment< typename Poly::RootType > collectRANIR(const std::set< Variable > &vars, const Model< Rational, Poly > &model)
Represent a collection of assignments/mappings from variables to values.
auto find(const typename Map::key_type &key) const
const ModelValue< Rational, Poly > & evaluated(const typename Map::key_type &key) const
Return the ModelValue for the given key, evaluated if it's a ModelSubstitution and evaluatable,...
Represent a sum type/variant over the different kinds of values that can be assigned to the different...
const Poly::RootType & asRAN() const
const ModelSubstitutionPtr< Rational, Poly > & asSubstitution() const
const Rational & asRational() const
bool isSubstitution() const