UPolDse< C, R > Struct Template Reference

List of all members.

Detailed Description

template<class C, class R = upol::rep<C>>
struct UPolDse< C, R >

Univariate polynomials.

Univariate polynomials, with a dense representation given by the container R. Forward and backward iterators are provided, as well as the arithmetic operations +,-,+=,-=,*,*=,/, /=, %,=. The operators % and / correspond respectively to the quotient and remainder computation in the Euclidean division. The operator()(const C &) corresponds to the evaluation of the polynomial.

The function checkdegree is called at the end of an arithmetic operation, to reajust the variable degree_, if it exists in the container R.

The container {R} should provide the following signatures: {SIGNATURE} typename R::value_type coeff_t; typedef typename R::size_type; typedef typename R::iterator;

R(size_type s, Alloc); R(size_type s, C *t); R(iterator b, iterator e); void R::reserve(size_type n); iterator R::begin() ; iterator R::begin() const ; iterator R::end() ; iterator R::end() const ; iterator R::rbegin() ; iterator R::rbegin() const; iterator R::rend() ; iterator R::rend() const; size_type R::size(); int degree(const R &); {SIGNATURE}

{Univariate polynomial, dense} {UPolDse}

Definition at line 62 of file UPolDse.h.

Public Types

typedef C value_type
typedef C coeff_t
typedef R::size_type size_type
typedef R rep_type
typedef R::iterator iterator
typedef R::const_iterator const_iterator
typedef R::reverse_iterator reverse_iterator
typedef R::const_reverse_iterator const_reverse_iterator
typedef UPolDse< C, R > self_t

Public Member Functions

R & rep ()
const R & rep () const
 UPolDse ()
 UPolDse (const R &r)
 UPolDse (const int n)
 UPolDse (size_type n, type::AsSize A)
 UPolDse (value_type c, size_type n=0)
 Construct the monomial $ c x^{n} $.
 UPolDse (size_type n, value_type *t)
 UPolDse (iterator b, iterator e)
 UPolDse (const char *)
 UPolDse (const self_t &P)
template<class S>
 UPolDse (const VAL< S > &P)
iterator begin ()
const_iterator begin () const
iterator end ()
const_iterator end () const
reverse_iterator rbegin ()
const_reverse_iterator rbegin () const
reverse_iterator rend ()
const_reverse_iterator rend () const
self_toperator= (const self_t &P)
template<class S>
self_toperator= (const VAL< S > &M)
bool operator== (int n) const
 Equality test to 0,1,.
bool operator!= (int n) const
bool operator== (const self_t &p) const
bool operator!= (const self_t &p) const
self_toperator+= (const self_t &P)
self_toperator+= (const value_type &c)
self_toperator-= (const self_t &P)
self_toperator-= (const value_type &c)
self_toperator *= (const self_t &P)
self_toperator *= (const value_type &c)
self_toperator/= (const self_t &Q)
self_toperator/= (const value_type &c)
self_toperator%= (const self_t &Q)
self_toperator%= (const value_type &x)
int get_degree () const
size_type size () const
void resize (size_type i)
value_typeoperator[] (size_type i)
value_type operator[] (size_type i) const
template<class T>
operator() (const T &c) const
bool operator< (const value_type &c)

Public Attributes

shared_object< R > data

Static Public Attributes

static char * var_

Constructor & Destructor Documentation

template<class C, class R>
UPolDse< C, R >::UPolDse ( value_type  c,
size_type  n = 0 

Construct the monomial $ c x^{n} $.

Definition at line 638 of file UPolDse.h.

References UPolDse< C, R >::rep(), and UPOLDAR::set_monomial().

template<class C, class R>
UPolDse< C, R >::UPolDse ( size_type  n,
value_type v 

Construct the polynomial, which coefficients are n values of the array v, in the internal representation basis.

Definition at line 647 of file UPolDse.h.

References UPolDse< C, R >::rep().

template<class C, class R>
UPolDse< C, R >::UPolDse ( iterator  b,
iterator  e 

Construct the polynomial, which coefficients are the values from iterator position b to e, in the internal representation basis.

Definition at line 659 of file UPolDse.h.

References UPolDse< C, R >::rep().

template<class C, class R>
UPolDse< C, R >::UPolDse ( const char *  s  ) 

Constructor of a univariate polynomial from a string. Example: UPolDse<C,R>("x0^2+x0^3-1").

Definition at line 671 of file UPolDse.h.

References VECTOR::init(), and UPolDse< C, R >::rep().

Member Function Documentation

template<class C, class R>
bool UPolDse< C, R >::operator== ( int  n  )  const

Equality test to 0,1,.

Definition at line 748 of file UPolDse.h.

References degree().

template<class C, class R>
template<class T>
T UPolDse< C, R >::operator() ( const T &  c  )  const

Evaluation of a polynomial, using Horner scheme. The output value is let by the type of c.

Definition at line 873 of file UPolDse.h.

References UPOLDAR::eval(), and UPolDse< C, R >::rep().

The documentation for this struct was generated from the following file: