4 #include "../umvpoly/UnivariatePolynomial.h"
5 #include "../umvpoly/MultivariatePolynomial.h"
9 template<
typename Coeff,
typename Ordering = GrLexOrdering,
typename Policies = StdMultivariatePolynomialPolicies<>>
26 std::sort(pvars.begin(), pvars.end());
28 if (binary_search(pvars.begin(), pvars.end(), *it))
return *it;
80 std::vector<ContextPolynomial<Coeff, Ordering, Policies>> coeffs;
81 for (
const auto& coeff :
m_content.coefficients()) {
100 template<
typename Coeff,
typename Ordering,
typename Policies>
103 template<
typename Coeff,
typename Ordering,
typename Policies>
106 template<
typename Coeff,
typename Ordering,
typename Policies>
111 template<
typename Coeff,
typename Ordering,
typename Policies>
116 template<
typename Coeff,
typename Ordering,
typename Policies>
121 template<
typename Coeff,
typename Ordering,
typename Policies>
126 template<
typename Coeff,
typename Ordering,
typename Policies>
134 template<
typename Coeff,
typename Ordering,
typename Policies>
139 template<
typename Coeff,
typename Ordering,
typename Policies>
144 template<
typename Coeff,
typename Ordering,
typename Policies>
149 template<
typename Coeff,
typename Ordering,
typename Policies>
159 template<
typename Coeff,
typename Ordering,
typename Policies>
160 struct hash<
carl::ContextPolynomial<Coeff, Ordering, Policies>> {
162 return std::hash<carl::UnivariatePolynomial<carl::MultivariatePolynomial<Coeff, Ordering, Policies>>>()(p.
content());
carl is the main namespace for the library.
UnivariatePolynomial< C > to_univariate_polynomial(const MultivariatePolynomial< C, O, P > &p)
Convert a univariate polynomial that is currently (mis)represented by a 'MultivariatePolynomial' into...
bool operator<(const BasicConstraint< P > &lhs, const BasicConstraint< P > &rhs)
bool is_constant(const ContextPolynomial< Coeff, Ordering, Policies > &p)
std::ostream & operator<<(std::ostream &os, const BasicConstraint< Poly > &c)
Prints the given constraint on the given stream.
bool is_zero(const Interval< Number > &i)
Check if this interval is a point-interval containing 0.
typename UnderlyingNumberType< P >::type Coeff
bool operator==(const BasicConstraint< P > &lhs, const BasicConstraint< P > &rhs)
void variables(const BasicConstraint< Pol > &c, carlVariables &vars)
std::size_t level_of(const ContextPolynomial< Coeff, Ordering, Policies > &p)
bool is_linear(const ContextPolynomial< Coeff, Ordering, Policies > &p)
A Variable represents an algebraic variable that can be used throughout carl.
static const Variable NO_VARIABLE
Instance of an invalid variable.
T type
A type associated with the type.
This class represents a univariate polynomial with coefficients of an arbitrary type.
The general-purpose multivariate polynomial class.
const std::vector< Variable > & variable_ordering() const
static Variable main_var(const Context &ctx, const MultivariatePolynomial< Coeff, Ordering, Policies > &p)
const UnivariatePolynomial< MultivariatePolynomial< Coeff, Ordering, Policies > > & content() const
auto constant_part() const
const Context & context() const
ContextPolynomial(const Context &context, const MultivariatePolynomial< Coeff, Ordering, Policies > &p)
ContextPolynomial(const Context &context, const Coeff &c)
ContextPolynomial(const Context &context, const UnivariatePolynomial< MultivariatePolynomial< Coeff, Ordering, Policies >> &p)
auto coefficients() const
ContextPolynomial(Context &&context, UnivariatePolynomial< MultivariatePolynomial< Coeff, Ordering, Policies >> &&p)
auto total_degree() const
typename UnivariatePolynomial< NumberType >::RootType RootType
typename UnderlyingNumberType< Coeff >::type NumberType
Number type within the coefficients.
UnivariatePolynomial< MultivariatePolynomial< Coeff, Ordering, Policies > > m_content
MultivariatePolynomial< Coeff, Ordering, Policies > as_multivariate() const
std::size_t operator()(const carl::ContextPolynomial< Coeff, Ordering, Policies > &p) const