Polynomial arithmetics functions
[The Polynomial Templates]


Detailed Description

Polynomial arithmetics functions.


Functions

template<class T>
void add (Polynomial< T > &r, const Polynomial< T > &p, const Polynomial< T > &q)
template<class T>
void add (Polynomial< T > &p, const Polynomial< T > &q)
template<class T>
void sub (Polynomial< T > &r, const Polynomial< T > &p, const Polynomial< T > &q)
template<class T>
void sub (Polynomial< T > &p, const Polynomial< T > &q)
template<class T>
void div (Polynomial< T > &q, Polynomial< T > &r, const Polynomial< T > &u, const Polynomial< T > &v)
template<class T>
void div (Polynomial< T > &u, Polynomial< T > &r, const Polynomial< T > &v)
template<class T>
void mul (Polynomial< T > &r, const T &s, const Polynomial< T > &p)
template<class T>
void mul (Polynomial< T > &p, const T &s)
template<class T>
void mul (Polynomial< T > &r, const Polynomial< T > &p, const Polynomial< T > &q)


Function Documentation

template<class T>
void add Polynomial< T > &  p,
const Polynomial< T > &  q
 

in-place polynomial addition.

Performs in-place addition of two polynomials $p\leftarrow p+q$ .

Parameters:
[in,out] p first input polynomial. On exit, contains the sum $p+q$ .
[in] q second input polynomial.
See also:
add(Polynomial<T>& r, const Polynomial<T>& p, const Polynomial<T>& q)
Polynomial::operator += (const Polynomial<T>& A)

Definition at line 625 of file Polynomial.h.

template<class T>
void add Polynomial< T > &  r,
const Polynomial< T > &  p,
const Polynomial< T > &  q
 

out-of-place polynomial addition.

Performs addition of two polynomials $r=p+q$ , resulting polynomial is stored in user-supplied polynomial r.

Parameters:
[out] r on exit, contains the polynomial $r=p+q$ .
[in] p first input polynomial.
[in] q second input polynomial.
See also:
operator+ (const Polynomial<T>& p, const Polynomial<T>& q)
add(Polynomial<T>& p, const Polynomial<T>& q)

Definition at line 590 of file Polynomial.h.

template<class T>
void div Polynomial< T > &  u,
Polynomial< T > &  r,
const Polynomial< T > &  v
 

in-place polynomial division.

Performs polynomial division. On exit:

\[u\leftarrow \frac{u}{v}\]

\[r=u\%v\]

Parameters:
[in,out] u numerator, holds quotient $\frac{u}{v}$ on exit.
[out] r remainder $r=u\%v$
[in] v divisor.
See also:
div(Polynomial<T>& q, Polynomial<T>& r, const Polynomial<T>& u, const Polynomial<T>& v)

Definition at line 752 of file Polynomial.h.

template<class T>
void div Polynomial< T > &  q,
Polynomial< T > &  r,
const Polynomial< T > &  u,
const Polynomial< T > &  v
 

out-of-place polynomial division.

Performs polynomial division. On exit:

\[q=\frac{u}{v}\]

\[r=u\%v\]

Parameters:
[out] q quotient $q=\frac{u}{v}$
[out] r remainder $r=u\%v$
[in] u numerator.
[in] v divisor.
See also:
div(Polynomial<T>& u, Polynomial<T>& r, const Polynomial<T>& v)

Definition at line 711 of file Polynomial.h.

template<class T>
void mul Polynomial< T > &  r,
const Polynomial< T > &  p,
const Polynomial< T > &  q
 

out-of-place polynomial multiply.

Multiplies two polynomials by convolution.

Parameters:
[out] r resulting polynomial $r=pq$
[in] p a polynomial.
[in] q another polynomial.
See also:
operator* (const Polynomial<T>& p, const Polynomial<T>& q)
Polynomial<T>::operator*= (const Polynomial<T>& p)

Definition at line 830 of file Polynomial.h.

template<class T>
void mul Polynomial< T > &  p,
const T &  s
[inline]
 

in-place polynomial scaling.

Polynomial scaling. Performs the operation $p(x)\leftarrow s.p(x)$ .

Parameters:
[in,out] p A polynomial, on exit contains the product $s.p(x)$
[in] s scalar.
See also:
mul(Polynomial<T>& r, const T& s, const Polynomial<T>& p)
Polynomial<T>::operator*= (Polynomial<T>& p, const T& s)

Definition at line 811 of file Polynomial.h.

template<class T>
void mul Polynomial< T > &  r,
const T &  s,
const Polynomial< T > &  p
 

out-of-place polynomial scaling.

Polynomial scaling. Performs the operation $r(x)=s.p(x)$ .

Parameters:
[out] r scaled polynomial $r(x)=s.p(x)$
[in] s scalar.
[in] p A polynomial.
See also:
mul(Polynomial<T>& p, const T& s)
operator* (const T& s, const Polynomial<T>& p)
operator* (const Polynomial<T>& p, const T& s)

Definition at line 789 of file Polynomial.h.

template<class T>
void sub Polynomial< T > &  p,
const Polynomial< T > &  q
 

in-place substraction of polynomials.

Performs in-place substraction of two polynomials $p\leftarrow p-q$ .

Parameters:
[in,out] p first input polynomial. On exit, contains the difference $p-q$ .
[in] q second input polynomial.

Definition at line 683 of file Polynomial.h.

template<class T>
void sub Polynomial< T > &  r,
const Polynomial< T > &  p,
const Polynomial< T > &  q
 

out-of-place substraction of polynomials.

Performs substraction of two polynomials $r=p-q$ , resulting polynomial is stored in user-supplied polynomial r.

Parameters:
[out] r on exit, contains the polynomial $p-q$ .
[in] p first input polynomial.
[in] q second input polynomial.

Definition at line 650 of file Polynomial.h.


Generated on Mon Aug 21 21:00:38 2006 for The Polynomials Templates Library by  doxygen 1.4.5