Givaro
Public Types | Public Member Functions | Data Fields | Protected Attributes
Poly1Dom< Domain, Dense > Class Template Reference

#include <givpoly1dense.h>

Inheritance diagram for Poly1Dom< Domain, Dense >:

Public Types

typedef Domain Domain_t
typedef Domain::Element Type_t
typedef Poly1Dom< Domain, DenseSelf_t
typedef givvector< Type_tStorage_t
typedef Storage_t Rep
typedef const Storage_t constRep
typedef Storage_t Element

Public Member Functions

 Poly1Dom ()
 Poly1Dom (const Domain &d, const Indeter &X=Indeter())
 Poly1Dom (const Self_t &)
Type_t characteristic () const
Integercharacteristic (Integer &p) const
int operator== (const Poly1Dom< Domain, Dense > &BC) const
int operator!= (const Poly1Dom< Domain, Dense > &BC) const
const IndetergetIndeter () const
IndetersetIndeter (const Indeter &X)
const Domainsubdomain () const
const Domaingetdomain () const
Domainsetdomain (const Domain &D)
Repinit (Rep &a) const
template<class XXX >
Repinit (Rep &p, const XXX &cste) const
Repinit (Rep &r, const Degree deg) const
template<class XXX >
Repinit (Rep &p, const Degree deg, const XXX &lcoeff) const
Repassign (Rep &p, const Degree deg, const Type_t &lcoeff) const
Repassign (Rep &p, const Type_t &cste) const
Repassign (Rep &p, const Rep &q) const
Type_tconvert (Type_t &, const Rep &) const
template<class XXX >
XXX & convert (XXX &p, const Rep &) const
template<class UU , template< class XX > class Vect>
Vect< UU > & convert (Vect< UU > &, const Rep &P) const
 ~Poly1Dom ()
int isZero (const Rep &P) const
int isOne (const Rep &P) const
int areEqual (const Rep &P, const Rep &Q) const
int areNEqual (const Rep &P, const Rep &Q) const
Type_tleadcoef (Type_t &c, const Rep &P) const
Type_tgetEntry (Type_t &c, const Degree &i, const Rep &P) const
Degreedegree (Degree &d, const Rep &P) const
Degreeval (Degree &d, const Rep &P) const
Repsetdegree (Rep &P) const
 Compute the degree of P.
Type_teval (Type_t &pval, const Rep &P, const Type_t &val) const
Repdiff (Rep &P, const Rep &Q) const
Repreverse (Rep &, const Rep &) const
Repreversein (Rep &) const
std::istream & read (std::istream &i)
std::ostream & write (std::ostream &o) const
std::istream & read (std::istream &i, Rep &n) const
std::ostream & write (std::ostream &o, const Rep &n) const
Repaddin (Rep &res, const Rep &u) const
Repadd (Rep &res, const Rep &u, const Rep &v) const
Repadd (Rep &res, const Rep &u, const Type_t &val) const
Repadd (Rep &res, const Type_t &val, const Rep &v) const
Repsubin (Rep &res, const Rep &u) const
Repsub (Rep &res, const Rep &u, const Rep &v) const
Repsub (Rep &res, const Rep &u, const Type_t &val) const
Repsub (Rep &res, const Type_t &val, const Rep &v) const
Repnegin (Rep &res) const
Repneg (Rep &res, const Rep &u) const
Repmulin (Rep &q, const Rep &a) const
Repmulin (Rep &q, const Type_t &a) const
Repmul (Rep &q, const Rep &a, const Rep &b) const
Repmul (Rep &q, const Type_t &a, const Rep &b) const
Repmul (Rep &q, const Rep &a, const Type_t &b) const
Repmul (Rep &, const Rep &, const Rep &, const Degree &, const Degree &) const
Repshiftin (Rep &, int) const
Repshift (Rep &, const Rep &, int) const
Repdivin (Rep &q, const Rep &a) const
Repdivin (Rep &q, const Type_t &a) const
Repdiv (Rep &q, const Rep &a, const Rep &b) const
Repdiv (Rep &q, const Type_t &a, const Rep &b) const
Repdiv (Rep &q, const Rep &a, const Type_t &b) const
Repmodin (Rep &q, const Rep &a) const
Repmodin (Rep &q, const Type_t &a) const
Repmod (Rep &q, const Rep &a, const Rep &b) const
Repmod (Rep &q, const Type_t &a, const Rep &b) const
Repmod (Rep &q, const Rep &a, const Type_t &b) const
Repaxpy (Rep &r, const Rep &a, const Rep &x, const Rep &y) const
Repaxpy (Rep &r, const Type_t &a, const Rep &x, const Rep &y) const
Repaxpyin (Rep &r, const Rep &a, const Rep &x) const
Repaxpyin (Rep &r, const Type_t &a, const Rep &x) const
Repmaxpy (Rep &r, const Rep &a, const Rep &b, const Rep &c) const
Repmaxpy (Rep &r, const Type_t &a, const Rep &b, const Rep &c) const
Repmaxpyin (Rep &r, const Rep &a, const Rep &b) const
Repmaxpyin (Rep &r, const Type_t &a, const Rep &b) const
Repaxmy (Rep &r, const Rep &a, const Rep &x, const Rep &y) const
Repaxmy (Rep &r, const Type_t &a, const Rep &x, const Rep &y) const
Repaxmyin (Rep &r, const Rep &a, const Rep &x) const
Repaxmyin (Rep &r, const Type_t &a, const Rep &x) const
Repdivmod (Rep &q, Rep &r, const Rep &a, const Rep &b) const
Repdivmodin (Rep &q, Rep &r, const Rep &b) const
Reppdivmod (Rep &q, Rep &r, Type_t &m, const Rep &a, const Rep &b) const
Reppmod (Rep &r, Type_t &m, const Rep &a, const Rep &b) const
Reppmod (Rep &r, const Rep &a, const Rep &b) const
Reppdiv (Rep &q, Type_t &m, const Rep &a, const Rep &b) const
Reppdiv (Rep &q, const Rep &a, const Rep &b) const
Repgcd (Rep &D, const Rep &P, const Rep &Q) const
Repgcd (Rep &D, Rep &U, Rep &V, const Rep &P, const Rep &Q) const
Replcm (Rep &D, const Rep &P, const Rep &Q) const
Repinvmod (Rep &U, const Rep &P, const Rep &Q) const
Repinvmodunit (Rep &U, const Rep &P, const Rep &Q) const
void ratrecon (Rep &N, Rep &D, const Rep &P, const Rep &M, const Degree &dk) const
bool ratreconcheck (Rep &N, Rep &D, const Rep &P, const Rep &M, const Degree &dk) const
Reppow (Rep &W, const Rep &P, long n) const
Reppowmod (Rep &W, const Rep &P, IntegerDom::Element pwr, const Rep &U) const
template<class MyInt >
Reppowmod (Rep &W, const Rep &P, MyInt pwr, const Rep &U) const
Reppower_compose (Rep &W, const Rep &P, long b) const
Repcyclotomic (Rep &P, long n) const
template<class RandIter >
Reprandom (RandIter &g, Rep &r) const
template<class RandIter >
Reprandom (RandIter &g, Rep &r, long s) const
template<class RandIter >
Reprandom (RandIter &g, Rep &r, Degree s) const
Reprandom (GivRandom &g, Rep &r, Degree s) const
template<class RandIter >
Reprandom (RandIter &g, Rep &r, const Rep &b) const
template<class RandIter >
Repnonzerorandom (RandIter &g, Rep &r) const
template<class RandIter >
Repnonzerorandom (RandIter &g, Rep &r, long s) const
template<class RandIter >
Repnonzerorandom (RandIter &g, Rep &r, Degree s) const
template<class RandIter >
Repnonzerorandom (RandIter &g, Rep &r, const Rep &b) const
size_t & sqrfree (size_t &Nfact, Rep *Fact, const Rep &P) const
 Sqrfree decomposition.
template<class Domain >
Poly1Dom< Domain, Dense >::Type_tconvert (typename Poly1Dom< Domain, Dense >::Type_t &Val, const typename Poly1Dom< Domain, Dense >::Rep &P) const
template<class XXX >
XXX & convert (XXX &Val, const typename Poly1Dom< Domain, Dense >::Rep &P) const
template<class UU , template< class XX > class Vect>
Vect< UU > & convert (Vect< UU > &Val, const typename Poly1Dom< Domain, Dense >::Rep &P) const
template<class RandIter >
Poly1Dom< Domain, Dense >::Reprandom (RandIter &g, typename Poly1Dom< Domain, Dense >::Rep &r, Degree d) const

Data Fields

Rep zero
Rep one

Protected Attributes

Domain _domain
Indeter _x

template<class Domain>
class Givaro::Poly1Dom< Domain, Dense >


Member Typedef Documentation

typedef Domain Domain_t
typedef Storage_t Rep
typedef const Storage_t constRep
typedef Storage_t Element

Constructor & Destructor Documentation

Poly1Dom ( ) [inline]
Poly1Dom ( const Domain d,
const Indeter X = Indeter() 
) [inline]
Poly1Dom ( const Self_t P) [inline]
~Poly1Dom ( ) [inline]

Member Function Documentation

Type_t characteristic ( ) const [inline]
Integer& characteristic ( Integer p) const [inline]
int operator== ( const Poly1Dom< Domain, Dense > &  BC) const [inline]
int operator!= ( const Poly1Dom< Domain, Dense > &  BC) const [inline]
const Indeter& getIndeter ( ) const [inline]
Indeter& setIndeter ( const Indeter X) [inline]
const Domain& subdomain ( ) const [inline]
const Domain& getdomain ( ) const [inline]
Domain& setdomain ( const Domain D) [inline]
Poly1Dom< Domain, Dense >::Rep & init ( Rep a) const [inline]
Poly1Dom< Domain, Dense >::Rep & init ( Rep p,
const XXX &  cste 
) const [inline]
Poly1Dom< Domain, Dense >::Rep & init ( Rep r,
const Degree  deg 
) const [inline]
Poly1Dom< Domain, Dense >::Rep & init ( Rep p,
const Degree  deg,
const XXX &  lcoeff 
) const [inline]
Poly1Dom< Domain, Dense >::Rep & assign ( Rep p,
const Degree  deg,
const Type_t lcoeff 
) const [inline]
Rep& assign ( Rep p,
const Type_t cste 
) const [inline]

Reimplemented in TruncDom< Domain >.

Poly1Dom< Domain, Dense >::Rep & assign ( Rep p,
const Rep q 
) const [inline]
Type_t& convert ( Type_t ,
const Rep  
) const
XXX& convert ( XXX &  p,
const Rep  
) const

Reimplemented in TruncDom< Domain >.

Vect<UU>& convert ( Vect< UU > &  ,
const Rep P 
) const
int isZero ( const Rep P) const [inline]

Reimplemented in TruncDom< Domain >.

int isOne ( const Rep P) const [inline]

Reimplemented in TruncDom< Domain >.

int areEqual ( const Rep P,
const Rep Q 
) const [inline]

Reimplemented in TruncDom< Domain >.

int areNEqual ( const Rep P,
const Rep Q 
) const [inline]

Reimplemented in TruncDom< Domain >.

Poly1Dom< Domain, Dense >::Type_t & leadcoef ( Type_t c,
const Rep P 
) const [inline]

Reimplemented in FixedTruncDom< Domain >.

Poly1Dom< Domain, Dense >::Type_t & getEntry ( Type_t c,
const Degree i,
const Rep P 
) const [inline]

Reimplemented in FixedTruncDom< Domain >.

Degree & degree ( Degree d,
const Rep P 
) const [inline]

Reimplemented in TruncDom< Domain >.

Degree & val ( Degree d,
const Rep P 
) const [inline]

Reimplemented in TruncDom< Domain >.

Poly1Dom< Domain, Dense >::Rep & setdegree ( Rep P) const [inline]

Compute the degree of P.

Warning:
this is an infamous function that may not leave P constant !!
Parameters:
Ppolynomial

Reimplemented in TruncDom< Domain >.

Poly1Dom< Domain, Dense >::Type_t & eval ( Type_t pval,
const Rep P,
const Type_t val 
) const [inline]
Poly1Dom< Domain, Dense >::Rep & diff ( Rep P,
const Rep Q 
) const [inline]
Poly1Dom< Domain, Dense >::Rep & reverse ( Rep P,
const Rep Q 
) const [inline]
Poly1Dom< Domain, Dense >::Rep & reversein ( Rep P) const [inline]
std::istream & read ( std::istream &  i)

Reimplemented in TruncDom< Domain >.

std::ostream & write ( std::ostream &  o) const
std::istream & read ( std::istream &  i,
Rep n 
) const
std::ostream & write ( std::ostream &  o,
const Rep n 
) const
Poly1Dom< Domain, Dense >::Rep & addin ( Rep res,
const Rep u 
) const [inline]
Poly1Dom< Domain, Dense >::Rep & add ( Rep res,
const Rep u,
const Rep v 
) const [inline]
Poly1Dom< Domain, Dense >::Rep & add ( Rep res,
const Rep u,
const Type_t val 
) const [inline]
Poly1Dom< Domain, Dense >::Rep & add ( Rep res,
const Type_t val,
const Rep v 
) const [inline]
Poly1Dom< Domain, Dense >::Rep & subin ( Rep res,
const Rep u 
) const [inline]
Poly1Dom< Domain, Dense >::Rep & sub ( Rep res,
const Rep u,
const Rep v 
) const [inline]
Poly1Dom< Domain, Dense >::Rep & sub ( Rep res,
const Rep u,
const Type_t val 
) const [inline]
Poly1Dom< Domain, Dense >::Rep & sub ( Rep res,
const Type_t val,
const Rep v 
) const [inline]
Poly1Dom< Domain, Dense >::Rep & negin ( Rep res) const [inline]

Reimplemented in TruncDom< Domain >.

Poly1Dom< Domain, Dense >::Rep & neg ( Rep res,
const Rep u 
) const [inline]

Reimplemented in TruncDom< Domain >.

Poly1Dom< Domain, Dense >::Rep & mulin ( Rep q,
const Rep a 
) const [inline]
Poly1Dom< Domain, Dense >::Rep & mulin ( Rep q,
const Type_t a 
) const [inline]
Poly1Dom< Domain, Dense >::Rep & mul ( Rep q,
const Rep a,
const Rep b 
) const [inline]
Poly1Dom< Domain, Dense >::Rep & mul ( Rep q,
const Type_t a,
const Rep b 
) const [inline]
Poly1Dom< Domain, Dense >::Rep & mul ( Rep q,
const Rep a,
const Type_t b 
) const [inline]
Poly1Dom< Domain, Dense >::Rep & mul ( Rep R,
const Rep P,
const Rep Q,
const Degree Val,
const Degree deg 
) const [inline]
Poly1Dom< Domain, Dense >::Rep & shiftin ( Rep R,
int  s 
) const [inline]
Poly1Dom< Domain, Dense >::Rep & shift ( Rep R,
const Rep a,
int  s 
) const [inline]
Poly1Dom< Domain, Dense >::Rep & divin ( Rep q,
const Rep a 
) const [inline]

Reimplemented in FixedTruncDom< Domain >.

Poly1Dom< Domain, Dense >::Rep & divin ( Rep q,
const Type_t a 
) const [inline]
Poly1Dom< Domain, Dense >::Rep & div ( Rep q,
const Rep a,
const Rep b 
) const [inline]

Reimplemented in FixedTruncDom< Domain >.

Poly1Dom< Domain, Dense >::Rep & div ( Rep q,
const Type_t a,
const Rep b 
) const [inline]
Poly1Dom< Domain, Dense >::Rep & div ( Rep q,
const Rep a,
const Type_t b 
) const [inline]
Poly1Dom< Domain, Dense >::Rep & modin ( Rep q,
const Rep a 
) const [inline]
Poly1Dom< Domain, Dense >::Rep & modin ( Rep q,
const Type_t a 
) const [inline]
Poly1Dom< Domain, Dense >::Rep & mod ( Rep q,
const Rep a,
const Rep b 
) const [inline]
Poly1Dom< Domain, Dense >::Rep & mod ( Rep q,
const Type_t a,
const Rep b 
) const [inline]
Poly1Dom< Domain, Dense >::Rep & mod ( Rep q,
const Rep a,
const Type_t b 
) const [inline]
Poly1Dom< Domain, Dense >::Rep & axpy ( Rep r,
const Rep a,
const Rep x,
const Rep y 
) const [inline]
Poly1Dom< Domain, Dense >::Rep & axpy ( Rep r,
const Type_t a,
const Rep x,
const Rep y 
) const [inline]
Poly1Dom< Domain, Dense >::Rep & axpyin ( Rep r,
const Rep a,
const Rep x 
) const [inline]
Poly1Dom< Domain, Dense >::Rep & axpyin ( Rep r,
const Type_t a,
const Rep x 
) const [inline]
Poly1Dom< Domain, Dense >::Rep & maxpy ( Rep r,
const Rep a,
const Rep b,
const Rep c 
) const [inline]
Poly1Dom< Domain, Dense >::Rep & maxpy ( Rep r,
const Type_t a,
const Rep b,
const Rep c 
) const [inline]
Poly1Dom< Domain, Dense >::Rep & maxpyin ( Rep r,
const Rep a,
const Rep b 
) const [inline]
Poly1Dom< Domain, Dense >::Rep & maxpyin ( Rep r,
const Type_t a,
const Rep b 
) const [inline]
Poly1Dom< Domain, Dense >::Rep & axmy ( Rep r,
const Rep a,
const Rep x,
const Rep y 
) const [inline]
Poly1Dom< Domain, Dense >::Rep & axmy ( Rep r,
const Type_t a,
const Rep x,
const Rep y 
) const [inline]
Poly1Dom< Domain, Dense >::Rep & axmyin ( Rep r,
const Rep a,
const Rep x 
) const [inline]
Poly1Dom< Domain, Dense >::Rep & axmyin ( Rep r,
const Type_t a,
const Rep x 
) const [inline]
Poly1Dom< Domain, Dense >::Rep & divmod ( Rep q,
Rep r,
const Rep a,
const Rep b 
) const [inline]
Poly1Dom< Domain, Dense >::Rep & divmodin ( Rep q,
Rep r,
const Rep b 
) const [inline]
Poly1Dom< Domain, Dense >::Rep & pdivmod ( Rep q,
Rep r,
Type_t m,
const Rep a,
const Rep b 
) const [inline]
Poly1Dom< Domain, Dense >::Rep & pmod ( Rep r,
Type_t m,
const Rep a,
const Rep b 
) const [inline]
Rep& pmod ( Rep r,
const Rep a,
const Rep b 
) const
Rep& pdiv ( Rep q,
Type_t m,
const Rep a,
const Rep b 
) const
Rep& pdiv ( Rep q,
const Rep a,
const Rep b 
) const
Poly1Dom< Domain, Dense >::Rep & gcd ( Rep D,
const Rep P,
const Rep Q 
) const [inline]
Poly1Dom< Domain, Dense >::Rep & gcd ( Rep D,
Rep U,
Rep V,
const Rep P,
const Rep Q 
) const [inline]
Poly1Dom< Domain, Dense >::Rep & lcm ( Rep D,
const Rep P,
const Rep Q 
) const [inline]
Poly1Dom< Domain, Dense >::Rep & invmod ( Rep U,
const Rep P,
const Rep Q 
) const [inline]
Poly1Dom< Domain, Dense >::Rep & invmodunit ( Rep U,
const Rep P,
const Rep Q 
) const [inline]
void ratrecon ( Rep N,
Rep D,
const Rep P,
const Rep M,
const Degree dk 
) const
bool ratreconcheck ( Rep N,
Rep D,
const Rep P,
const Rep M,
const Degree dk 
) const
Poly1Dom< Domain, Dense >::Rep & pow ( Rep W,
const Rep P,
long  n 
) const [inline]
Poly1Dom< Domain, Dense >::Rep & powmod ( Rep W,
const Rep P,
IntegerDom::Element  pwr,
const Rep U 
) const [inline]
Rep& powmod ( Rep W,
const Rep P,
MyInt  pwr,
const Rep U 
) const [inline]
Poly1Dom< Domain, Dense >::Rep & power_compose ( Rep W,
const Rep P,
long  b 
) const [inline]
Poly1Dom< Domain, Dense >::Rep & cyclotomic ( Rep P,
long  n 
) const [inline]
Poly1Dom< Domain, Dense >::Rep & random ( RandIter &  g,
Rep r 
) const [inline]

Reimplemented in TruncDom< Domain >.

Poly1Dom< Domain, Dense >::Rep & random ( RandIter &  g,
Rep r,
long  s 
) const [inline]

Reimplemented in TruncDom< Domain >.

Rep& random ( RandIter &  g,
Rep r,
Degree  s 
) const
Poly1Dom< Domain, Dense >::Rep & random ( GivRandom g,
Rep r,
Degree  s 
) const [inline]
Poly1Dom< Domain, Dense >::Rep & random ( RandIter &  g,
Rep r,
const Rep b 
) const [inline]

Reimplemented in TruncDom< Domain >.

Poly1Dom< Domain, Dense >::Rep & nonzerorandom ( RandIter &  g,
Rep r 
) const [inline]

Reimplemented in TruncDom< Domain >.

Poly1Dom< Domain, Dense >::Rep & nonzerorandom ( RandIter &  g,
Rep r,
long  s 
) const [inline]

Reimplemented in TruncDom< Domain >.

Poly1Dom< Domain, Dense >::Rep & nonzerorandom ( RandIter &  g,
Rep r,
Degree  s 
) const [inline]

Reimplemented in TruncDom< Domain >.

Poly1Dom< Domain, Dense >::Rep & nonzerorandom ( RandIter &  g,
Rep r,
const Rep b 
) const [inline]

Reimplemented in TruncDom< Domain >.

size_t & sqrfree ( size_t &  Nfact,
Rep Fact,
const Rep P 
) const

Sqrfree decomposition.

Decompose P such that: P = Fact[0]^0 * Fact[1]^1 * ... * Fact[P.degree()]^(P.degree()), with Fact[0] the leading coefficient. The array Fact must be allocated before calling the function. The size of Fact must be degP+1 is all factors should be computed. For more readeable version of the algorithm, see Geddes, p342.

Parameters:
Nfact[in] the size of Fact
Fact[in] an array of dimension Nfact
Nfact[out] is the number of factor in the sqrfree decomposition
Fact[out] contains at most Nfact factors of the decomposition.
Poly1Dom<Domain,Dense>::Type_t& convert ( typename Poly1Dom< Domain, Dense >::Type_t Val,
const typename Poly1Dom< Domain, Dense >::Rep P 
) const [inline]
XXX& convert ( XXX &  Val,
const typename Poly1Dom< Domain, Dense >::Rep P 
) const [inline]
Vect<UU>& convert ( Vect< UU > &  Val,
const typename Poly1Dom< Domain, Dense >::Rep P 
) const [inline]
Poly1Dom<Domain,Dense>::Rep& random ( RandIter &  g,
typename Poly1Dom< Domain, Dense >::Rep r,
Degree  d 
) const [inline]

Field Documentation

Domain _domain [protected]
Indeter _x [protected]

Reimplemented in TruncDom< Domain >.

Reimplemented in TruncDom< Domain >.


The documentation for this class was generated from the following files: