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 . | |
| 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_t & | operator= (const self_t &P) |
| template<class S> | |
| self_t & | operator= (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_t & | operator+= (const self_t &P) |
| self_t & | operator+= (const value_type &c) |
| self_t & | operator-= (const self_t &P) |
| self_t & | operator-= (const value_type &c) |
| self_t & | operator *= (const self_t &P) |
| self_t & | operator *= (const value_type &c) |
| self_t & | operator/= (const self_t &Q) |
| self_t & | operator/= (const value_type &c) |
| self_t & | operator%= (const self_t &Q) |
| self_t & | operator%= (const value_type &x) |
| int | get_degree () const |
| size_type | size () const |
| void | resize (size_type i) |
| value_type & | operator[] (size_type i) |
| value_type | operator[] (size_type i) const |
| template<class T> | |
| T | operator() (const T &c) const |
| bool | operator< (const value_type &c) |
Public Attributes | |
| shared_object< R > | data |
Static Public Attributes | |
| static char * | var_ |
| UPolDse< C, R >::UPolDse | ( | value_type | c, | |
| size_type | n = 0 | |||
| ) |
Construct the monomial
.
Definition at line 638 of file UPolDse.h.
References UPolDse< C, R >::rep(), and UPOLDAR::set_monomial().
| 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().
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().
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().
| bool UPolDse< C, R >::operator== | ( | int | n | ) | 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().
![]() |