6 #include "../UnivariatePolynomial.h"
18 template<
typename Coefficient>
21 [&i](
const auto& p){ return carl::sgn(carl::evaluate(p, i.lower())); }
24 [&i](
const auto& p){ return carl::sgn(carl::evaluate(p, i.upper())); }
35 template<
typename Coefficient>
carl is the main namespace for the library.
std::vector< UnivariatePolynomial< Coeff > > sturm_sequence(const UnivariatePolynomial< Coeff > &p, const UnivariatePolynomial< Coeff > &q)
Computes the sturm sequence of two polynomials.
int count_real_roots(const std::vector< UnivariatePolynomial< Coefficient >> &seq, const Interval< Coefficient > &i)
Calculate the number of real roots of a polynomial within a given interval based on a sturm sequence ...
std::size_t sign_variations(InputIterator begin, InputIterator end)
Counts the number of sign variations in the given object range.
bool is_zero(const Interval< Number > &i)
Check if this interval is a point-interval containing 0.
bool is_root_of(const UnivariatePolynomial< Coeff > &p, const Coeff &value)
The class which contains the interval arithmetic including trigonometric functions.
const Number & upper() const
The getter for the upper boundary of the interval.
const Number & lower() const
The getter for the lower boundary of the interval.
This class represents a univariate polynomial with coefficients of an arbitrary type.