It contains generic implementations on univariate (dense) polynomials.
This set of functions apply when R provides the following methods
or definitions:
typename R::value_type;
typename R::size_type;
typename R::iterator;
typename R::reverse_iterator;
iterator_t R::begin();
iterator_t R::end();
value_type R::operator[](int);
template < class R>
inline void UPOLYNOMIAL::plus(R & r, const R & a, const R & b)
Addition of two polynomials. r should be allocated to the correct
size and with 0 entries.
template < class R>
inline void UPOLYNOMIAL::minus(R & r, const R & a, const R & b)
Substraction of two polynomials. r should be allocated to the
correct size and with 0 entries.
template < class R,class A, class B>
inline void UPOLYNOMIAL::mult_index(R & r, const A & a, const B & b)
Naive multiplication of two polynomials using indices.
r should be allocated to the correct size and with 0 entries.
template < class R>
inline void UPOLYNOMIAL::mult(R & r, const R & a, const R & b)
Naive multiplication of two polynomials using iterators.
r should be allocated to the correct size and with 0 entries.
template < class R>
inline void UPOLYNOMIAL::mult_index(R & a, const R & b)
Naive inplace multiplication of a by b using indices.
The result is put in a. A copy of a is made
template < class R>
inline void UPOLYNOMIAL::mult(R & a, const R & b)
Naive inplace multiplication of a by b using iterators.
The result is put in a. A copy of a is made
template < class R,class C>
inline void UPOLYNOMIAL::mult_scalar(R & r, const R & a, const C & c)
Multiplication by a scalar.
template < class C, class R>
inline C UPOLYNOMIAL::eval(const R & p, const C & c)
The value of a polynomial p at x, using Horner scheme and reverse
iterators.
template< class R> inline void UPOLYNOMIAL::checkdegree(R & w)
Function called at the end of an arithmetic operation to readjust
a degree variable if it exists.Its default value is .