27 #ifndef MPBLOCKS_POLYNOMIAL_STURMSEQUENCE_H_
28 #define MPBLOCKS_POLYNOMIAL_STURMSEQUENCE_H_
34 namespace polynomial {
38 template <
typename Scalar>
44 typedef std::vector< Polynomial<Scalar,Dynamic> >
PolyList_t;
55 template <
class Exp >
76 for(
int i=2; i < rhs.
size(); i++)
89 for(
int i=1; i <
m_seq.size(); i++)
94 if(
sgn(next) !=
sgn(prev) )
139 #endif // STURMSEQUENCE_H_
int signChanges(Scalar x)
return the number of sign changes at the specified point
const RValue< Scalar, Poly_t > & operator[](int i) const
Quotient< Scalar, Poly_t, Poly_t > Quotient_t
expression template for sum of two matrix expressions
Size_t size() const
return the size for a vector
LValue< Scalar, Exp > & lvalue(LValue< Scalar, Exp > &exp)
void rebuild(const RValue< Scalar, Exp > &rhs)
expression template for rvalues
Normalized< Scalar, Exp > normalized(RValue< Scalar, Exp > const &exp)
A dense, dynamically sized polynomial.
SturmSequence(const RValue< Scalar, Exp > &rhs)
builds a sturm sequence from a polynomial
std::vector< Polynomial< Scalar, Dynamic > > PolyList_t
Polynomial< Scalar, Dynamic > Poly_t
void differentiate(const RValue< Scalar, Exp1 > &in, LValue< Scalar, Exp2 > &out, int n)
evaluate a polynomial
RValue< Scalar, Polynomial< Scalar, Dynamic > > & r()
Scalar polyval(const RValue< Scalar, Exp > &poly, Scalar x)
evaluate a polynomial