UPQuotient<R>::poly. Elements are represented in the Horner basis associated with poly. All the arithmetic operations are performed in this basis. Only the display of a polynomial needs a change to the monomial basis.
Definition at line 38 of file quotient.h.
Public Types | |
| typedef R::value_type | value_type |
| typedef R::size_type | size_type |
| typedef R::iterator | iterator |
| typedef R::reverse_iterator | iterator_r |
| typedef upol::horner< C > | rep_type |
| typedef ModUPol< C, R > | self_t |
Public Member Functions | |
| ModUPol () | |
| ModUPol (const R &r) | |
| ModUPol (const ModUPol< R > &Mod) | |
| template<class S> | |
| void | monomial_to_horner (rep_type &h, const S &pol) |
| template<class S> | |
| void | horner_to_monomial (S &h, const rep_type &h) |
| size_type | dim () |
| void | assign (rep_type &r, const rep_type &a) |
| void | assign (rep_type &r, const R &a) |
| void | assign (rep_type &r, const value_type &a) |
| void | assign (rep_type &r, int a) |
| void | add (rep_type &r, const rep_type &a, const rep_type &b) |
Addition of a and b in r. | |
| void | add (rep_type &r, const rep_type &a) |
Inplace addition of a to r. | |
| void | sub (rep_type &r, const rep_type &a, const rep_type &b) |
Susbtraction of a and b in r. | |
| void | sub (rep_type &r, const rep_type &a) |
Inplace substraction of a to r. | |
| void | mul (rep_type &r, const rep_type &a, const rep_type &b) |
Multiply a by b in $$ and put it x. | |
| void | mul (rep_type &r, const rep_type &a, const C &b) |
| void | div (rep_type &r, const rep_type &a, const C &b) |
| void | square (rep_type &r, const rep_type &a) |
Square f in $$ and put it x. | |
| void | print (std::ostream &os, const rep_type &a) |
| void | read (std::istream &is, rep_type &a) |
Public Attributes | |
| R | poly |
| void quotient::ModUPol< C, R >::monomial_to_horner | ( | rep_type & | x, | |
| const S & | pol | |||
| ) |
Express the polynomial $x$ from a basis (Monomial or Horner) in the other basis. From the Horner basis to the monomial basis (MtoH=false), the Bezoutian matrix $B_{1,p}$ is used. For the other case (MtoH=true), the matrix $H_{{p}}$ is used.
Definition at line 186 of file quotient.h.
References linalg::rep1d< C >::begin(), degree(), quotient::ModUPol< C, R >::dim(), VECTOR::init(), quotient::ModUPol< C, R >::poly, upol::rep< C >::resize(), and VECTOR::reverse().
Referenced by quotient::ModUPol< C, R >::assign().
| void quotient::ModUPol< C, R >::horner_to_monomial | ( | S & | x, | |
| const rep_type & | pol | |||
| ) |
Express the polynomial $x$ from a basis (Monomial or Horner) in the other basis. From the Horner basis to the monomial basis (MtoH=false), the Bezoutian matrix $B_{1,p}$ is used. For the other case (MtoH=true), the matrix $H_{{p}}$ is used.
Definition at line 223 of file quotient.h.
References linalg::rep1d< C >::begin(), bezout(), degree(), quotient::ModUPol< C, R >::dim(), upol::rep< C >::end(), VECTOR::init(), quotient::ModUPol< C, R >::poly, and VECTOR::reverse().
Referenced by quotient::ModUPol< C, R >::print().
| void quotient::ModUPol< C, R >::add | ( | rep_type & | r, | |
| const rep_type & | a, | |||
| const rep_type & | b | |||
| ) |
Addition of a and b in r.
Definition at line 85 of file quotient.h.
References add(), quotient::ModUPol< C, R >::dim(), and upol::rep< C >::resize().
Referenced by quotient::ModUPol< C, R >::mul().
| void quotient::ModUPol< C, R >::add | ( | rep_type & | r, | |
| const rep_type & | a | |||
| ) |
Inplace addition of a to r.
Definition at line 92 of file quotient.h.
References add(), quotient::ModUPol< C, R >::dim(), and upol::rep< C >::resize().
| void quotient::ModUPol< C, R >::sub | ( | rep_type & | r, | |
| const rep_type & | a, | |||
| const rep_type & | b | |||
| ) |
Susbtraction of a and b in r.
Definition at line 99 of file quotient.h.
References quotient::ModUPol< C, R >::dim(), upol::rep< C >::resize(), and sub().
Referenced by quotient::ModUPol< C, R >::mul().
| void quotient::ModUPol< C, R >::sub | ( | rep_type & | r, | |
| const rep_type & | a | |||
| ) |
Inplace substraction of a to r.
Definition at line 106 of file quotient.h.
References quotient::ModUPol< C, R >::dim(), upol::rep< C >::resize(), and sub().
| void quotient::ModUPol< C, R >::mul | ( | rep_type & | r, | |
| const rep_type & | a, | |||
| const rep_type & | b | |||
| ) |
Multiply a by b in $$ and put it x.
Definition at line 160 of file quotient.h.
References quotient::ModUPol< C, R >::add(), degree(), quotient::ModUPol< C, R >::dim(), VECTOR::div_ext(), quotient::ModUPol< C, R >::square(), and quotient::ModUPol< C, R >::sub().
| void quotient::ModUPol< C, R >::square | ( | rep_type & | r, | |
| const rep_type & | a | |||
| ) |
Square f in $$ and put it x.
Definition at line 113 of file quotient.h.
References UPOLDAR::checkdegree(), degree(), quotient::ModUPol< C, R >::dim(), VECTOR::init(), UPOLDAR::mul_index(), quotient::ModUPol< C, R >::poly, upol::rep< C >::resize(), and linalg::rep1d< C >::size().
Referenced by quotient::ModUPol< C, R >::mul().
![]() |