6 #include "../UnivariatePolynomial.h"
15 template<
typename Coeff>
17 std::vector<UnivariatePolynomial<Coeff>> seq({ p, q });
20 for (std::size_t k = 2; ; ++k) {
21 auto tmp = -
remainder(seq[k-2], seq[k-1]);
23 seq.emplace_back(std::move(tmp));
34 template<
typename Coeff>
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.
const T & derivative(const T &t, Variable, std::size_t n=1)
Computes the n'th derivative of a number, which is either the number itself (for n = 0) or zero.
bool is_zero(const Interval< Number > &i)
Check if this interval is a point-interval containing 0.
cln::cl_I remainder(const cln::cl_I &a, const cln::cl_I &b)
Calculate the remainder of the integer division.
This class represents a univariate polynomial with coefficients of an arbitrary type.