Template Class Poly

Inheritance Relationships

Base Type

  • public Eigen::Matrix< Real, Eigen::Dynamic, 1 >

Class Documentation

template<typename Real>
class Utils::Poly : public Eigen::Matrix<Real, Eigen::Dynamic, 1>

Public Types

typedef int Integer
typedef Eigen::Matrix<Real, Eigen::Dynamic, 1> dvec_t
typedef Poly<Real> Poly_t

Public Functions

inline Poly()
inline Poly(int order)
inline Poly(Poly_t const &c)
inline Poly(dvec_t const &c)
inline dvec_t const &to_eigen() const
inline void set_order(Integer order)
inline void set_degree(Integer degree)
Poly_t &set_scalar(Real a)
Poly_t &set_monomial(Real a)
inline dvec_t coeffs() const
inline Integer degree() const
inline Integer order() const
Real eval(Real x) const
Real eval_D(Real x) const
void eval(Real x, Real &p, Real &Dp) const
inline Real leading_coeff() const
void derivative(Poly_t&) const
void integral(Poly_t&) const
Real normalize(void)

Scale polynomial \( p(x) = \sum_{i=0}^n a_i x^i \) in such a way \( \max_{i=0}^n (|a_i|/S) = 1 \). Return the scaling value \( S \)

void purge(Real epsi)

On the polynomial \( p(x) = \sum_{i=0}^n a_i x^i \) purge (set to 0) elements such that \( |a_i| \leq \epsilon \).

void adjust_degree(void)

Change the polynomial order of the polynomial \( p(x) = \sum_{i=0}^n a_i x^i \) in such a way that \( a_n \neq 0 \).

Integer sign_variations(void) const

Count the sign variations of the polynomial \( p(x) = \sum_{i=0}^n a_i x^i \) i.e. the number of sign change of the sequance \( [a_0,a_1,\ldots,a_n] \).

inline void make_monic(void)

Change the polynomial in such a way \( p(x) = x^n + \sum_{i=0}^{n-1} a_i x^i \).

Poly_t &operator=(Poly_t const&)
inline Poly_t operator-()
Poly_t &operator+=(Poly_t const&)
Poly_t &operator-=(Poly_t const&)
Poly_t &operator*=(Poly_t const&)
Poly_t &operator+=(Real)
Poly_t &operator-=(Real)
Poly_t &operator*=(Real)