6 #include "../MultivariatePolynomial.h"
7 #include "../UnivariatePolynomial.h"
32 return os <<
"negative";
34 return os <<
"seminegative";
38 return os <<
"semipositive";
40 return os <<
"positive";
45 template<
typename Coeff>
57 template<
typename C,
typename O,
typename P>
67 CARL_LOG_DEBUG(
"carl.core",
"Got " << result <<
" from first term " << *term);
69 if (term == p.
rend())
return result;
71 for (; term != p.
rend(); ++term) {
74 if( termDefin > result ) result = termDefin;
81 for (; term != p.
rend(); ++term) {
84 if( termDefin < result ) result = termDefin;
Implements utility functions concerning the (total) degree of monomials, terms and polynomials.
#define CARL_LOG_DEBUG(channel, msg)
carl is the main namespace for the library.
std::vector< std::pair< C, MultivariatePolynomial< C, O, P > > > sos_decomposition(const MultivariatePolynomial< C, O, P > &p, bool not_trivial=false)
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.
Definiteness definiteness(const Term< Coeff > &t)
bool is_zero(const Interval< Number > &i)
Check if this interval is a point-interval containing 0.
typename UnderlyingNumberType< P >::type Coeff
bool is_negative(const cln::cl_I &n)
Definiteness
Regarding a polynomial as a function , its definiteness gives information about the codomain .
@ NEGATIVE_SEMI
Indicates that .
@ NEGATIVE
Indicates that .
@ NON
Indicates that values may be positive and negative.
@ POSITIVE
Indicates that .
@ POSITIVE_SEMI
Indicates that .
bool is_linear(const ContextPolynomial< Coeff, Ordering, Policies > &p)
auto total_degree(const Monomial &m)
Gives the total degree, i.e.
The general-purpose multivariate polynomial class.
const Term< Coeff > & lterm() const
The leading term.
const Coeff & constant_part() const
Retrieve the constant term of this polynomial or zero, if there is no constant term.
bool has_constant_term() const
Check if the polynomial has a constant term that is not zero.
Coefficient & coeff()
Get the coefficient.
Monomial::Arg & monomial()
Get the monomial.