3 #include "../../VarInfo.h"
4 #include "../MultivariatePolynomial.h"
10 template<
typename CoeffType>
13 exponent exp = term.monomial()->exponent_of_variable(var);
18 typename CoeffType::MonomType::Arg m = term.monomial()->drop_variable(var);
32 template<
typename Coeff,
typename Ordering,
typename Policies>
34 for (
const auto& ve : *term.
monomial()) {
35 auto& info = infos.var(ve.first);
37 info.increase_num_occurences();
38 info.raise_max_degree(ve.second);
39 info.lower_min_degree(ve.second);
53 template<
typename Coeff,
typename Ordering,
typename Policies>
56 for (
const auto& term : poly) {
62 template<
typename Coeff,
typename Ordering,
typename Policies>
71 res.
data().emplace(var,
var_info(poly, var, collect_coeff));
carl is the main namespace for the library.
std::size_t exponent
Type of an exponent.
Interval< Number > exp(const Interval< Number > &i)
VarInfo< MultivariatePolynomial< Coeff, Ordering, Policies > > var_info(const MultivariatePolynomial< Coeff, Ordering, Policies > &poly, const Variable var, bool collect_coeff=false)
void variables(const BasicConstraint< Pol > &c, carlVariables &vars)
VarsInfo< MultivariatePolynomial< Coeff, Ordering, Policies > > vars_info(const MultivariatePolynomial< Coeff, Ordering, Policies > &poly, bool collect_coeff=false)
void vars_info_term(VarsInfo< MultivariatePolynomial< Coeff, Ordering, Policies >> &infos, const typename MultivariatePolynomial< Coeff, Ordering, Policies >::TermType &term, bool collect_coeff)
void var_info_term(VarInfo< CoeffType > &info, const typename CoeffType::TermType &term, const Variable var, bool collect_coeff)
A Variable represents an algebraic variable that can be used throughout carl.
The general-purpose multivariate polynomial class.
std::shared_ptr< const Monomial > Arg
Coefficient & coeff()
Get the coefficient.
Monomial::Arg & monomial()
Get the monomial.
void increase_num_occurences()
void update_coeff(std::size_t exponent, const Term &t)
void raise_max_degree(std::size_t degree)
void lower_min_degree(std::size_t degree)