Givaro
Public Types | Public Member Functions | Data Fields
IntPrimeDom Class Reference

#include <givintprime.h>

Inheritance diagram for IntPrimeDom:

Public Types

typedef Integer Rep
typedef Rep Element

Public Member Functions

 IntPrimeDom ()
int isprime (const Rep &n, int r=_GIVARO_ISPRIMETESTS_) const
unsigned int isprimepower (Rep &, const Rep &) const
template<class RandIter >
unsigned int Miller (RandIter &g, const Rep &n=_GIVARO_ISPRIMETESTS_) const
template<class RandIter >
Rep & test_Lehmann (RandIter &g, Rep &, const Rep &n=_GIVARO_ISPRIMETESTS_) const
template<class RandIter >
int Lehmann (RandIter &g, const Rep &n=_GIVARO_ISPRIMETESTS_) const
int isprime_Tabule (const int n) const
int isprime_Tabule2 (const int n) const
Rep & nextprime (Rep &, const Rep &, int r=_GIVARO_ISPRIMETESTS_) const
Rep & prevprime (Rep &, const Rep &, int r=_GIVARO_ISPRIMETESTS_) const
Rep & nextprimein (Rep &, int r=_GIVARO_ISPRIMETESTS_) const
Rep & prevprimein (Rep &, int r=_GIVARO_ISPRIMETESTS_) const
int local_prime (const Rep &n, int r=_GIVARO_ISPRIMETESTS_) const
int operator== (const IntegerDom &) const
int operator!= (const IntegerDom &) const
Rep & init (Rep &a) const
Rep & init (Rep &a, const Rep &b) const
Rep & read (Rep &a, const long i) const
Rep & read (Rep &a, const unsigned long i) const
Rep & read (Rep &a, const int i) const
Rep & read (Rep &a, const unsigned int i) const
std::istream & read (std::istream &i)
std::istream & read (std::istream &i, Rep &n) const
Rep & convert (Rep &a, const Rep &b) const
template<class XXX >
XXX & convert (XXX &x, const Rep &a) const
Rep & assign (Rep &a, const Rep &b) const
const Rep & access (const Rep &a) const
Rep & mul (Rep &r, const Rep &a, const Rep &b) const
Rep & div (Rep &r, const Rep &a, const Rep &b) const
Rep & mod (Rep &r, const Rep &a, const Rep &b) const
Rep & add (Rep &r, const Rep &a, const Rep &b) const
Rep & sub (Rep &r, const Rep &a, const Rep &b) const
Rep & divmod (Rep &q, Rep &r, const Rep &a, const Rep &b) const
Rep & divexact (Rep &q, const Rep &a, const Rep &b) const
Rep & mulin (Rep &r, const Rep &a) const
Rep & divin (Rep &r, const Rep &a) const
Rep & modin (Rep &r, const Rep &a) const
Rep & addin (Rep &r, const Rep &a) const
Rep & subin (Rep &r, const Rep &a) const
Rep & axpy (Rep &r, const Rep &a, const Rep &b, const Rep &c) const
Rep & maxpy (Rep &r, const Rep &a, const Rep &b, const Rep &c) const
Rep & maxpyin (Rep &r, const Rep &a, const Rep &b) const
Rep & axmy (Rep &r, const Rep &a, const Rep &b, const Rep &c) const
Rep & axpyin (Rep &r, const Rep &a, const Rep &b) const
Rep & axmyin (Rep &r, const Rep &a, const Rep &b) const
Rep & neg (Rep &r, const Rep &a) const
Rep & negin (Rep &r) const
Rep & gcd (Rep &g, Rep &u, Rep &v, const Rep &a, const Rep &b) const
Rep & gcd (Rep &g, const Rep &a, const Rep &b) const
Rep & lcm (Rep &l, const Rep &a, const Rep &b) const
Rep & lcmin (Rep &l, const Rep &a) const
Rep & inv (Rep &u, const Rep &a, const Rep &b) const
Rep & invin (Rep &u, const Rep &b) const
Rep & pow (Rep &r, const Rep &n, const long l) const
Rep & pow (Rep &r, const Rep &n, const unsigned long l) const
Rep & pow (Rep &r, const Rep &n, const int l) const
Rep & pow (Rep &r, const Rep &n, const unsigned int l) const
Rep & sqrt (Rep &s, const Rep &n) const
Rep & sqrt (Rep &s, Rep &r, const Rep &n) const
long logp (const Rep &a, const Rep &p) const
Rep & powmod (Rep &r, const Rep &n, const long e, const Rep &m) const
Rep & powmod (Rep &r, const Rep &n, const Rep &e, const Rep &m) const
unsigned long length (const Rep &a) const
int sign (const Rep &a) const
bool isZero (const Rep &a) const
bool isOne (const Rep &a) const
bool areEqual (const Rep &a, const Rep &b) const
bool areNEqual (const Rep &a, const Rep &b) const
bool isgeq (const Rep &a, const Rep &b) const
bool isgeq (const long b, const Rep &a) const
bool isgeq (const Rep &a, const long b) const
bool isleq (const Rep &a, const Rep &b) const
bool isleq (const long b, const Rep &a) const
bool isleq (const Rep &a, const long b) const
bool isgt (const Rep &a, const Rep &b) const
bool isgt (const long b, const Rep &a) const
bool isgt (const Rep &a, const long b) const
bool islt (const Rep &a, const Rep &b) const
bool islt (const long b, const Rep &a) const
bool islt (const Rep &a, const long b) const
template<class RandIter >
Rep & random (RandIter &, Rep &r, long s=1) const
template<class RandIter >
Rep & random (RandIter &, Rep &r, const Rep &b) const
template<class RandIter >
Rep & nonzerorandom (RandIter &, Rep &r, long s=1) const
template<class RandIter >
Rep & nonzerorandom (RandIter &, Rep &r, const Rep &b) const
std::ostream & write (std::ostream &o) const
std::ostream & write (std::ostream &o, const Rep &n) const

Data Fields

const Integer one
const Integer zero

Detailed Description

Examples:

examples/Integer/ispower.C, examples/Integer/isprime.C, examples/Integer/nb_primes.C, examples/Integer/nextprime.C, examples/Integer/prevprime.C, and examples/Polynomial/PolynomialCRT.C.


Member Typedef Documentation

typedef Integer Rep [inherited]
typedef Rep Element [inherited]

Constructor & Destructor Documentation

IntPrimeDom ( ) [inline]

Member Function Documentation

int isprime ( const Rep &  n,
int  r = _GIVARO_ISPRIMETESTS_ 
) const [inline]
unsigned int isprimepower ( Rep &  q,
const Rep &  u 
) const
unsigned int Miller ( RandIter &  g,
const Rep &  n = _GIVARO_ISPRIMETESTS_ 
) const
IntPrimeDom::Rep & test_Lehmann ( RandIter &  g,
Rep &  r,
const Rep &  n = _GIVARO_ISPRIMETESTS_ 
) const
int Lehmann ( RandIter &  g,
const Rep &  n = _GIVARO_ISPRIMETESTS_ 
) const
int isprime_Tabule ( const int  n) const
int isprime_Tabule2 ( const int  n) const
IntPrimeDom::Rep & nextprime ( Rep &  n,
const Rep &  p,
int  r = _GIVARO_ISPRIMETESTS_ 
) const
IntPrimeDom::Rep & prevprime ( Rep &  n,
const Rep &  p,
int  r = _GIVARO_ISPRIMETESTS_ 
) const
IntPrimeDom::Rep & nextprimein ( Rep &  n,
int  r = _GIVARO_ISPRIMETESTS_ 
) const
IntPrimeDom::Rep & prevprimein ( Rep &  n,
int  r = _GIVARO_ISPRIMETESTS_ 
) const
int local_prime ( const Rep &  n,
int  r = _GIVARO_ISPRIMETESTS_ 
) const [inline]
int operator== ( const IntegerDom &  ) const [inline, inherited]
int operator!= ( const IntegerDom &  ) const [inline, inherited]
Rep& init ( Rep &  a) const [inline, inherited]
Rep& init ( Rep &  a,
const Rep &  b 
) const [inline, inherited]
Rep& read ( Rep &  a,
const long  i 
) const [inline, inherited]
Rep& read ( Rep &  a,
const unsigned long  i 
) const [inline, inherited]
Rep& read ( Rep &  a,
const int  i 
) const [inline, inherited]
Rep& read ( Rep &  a,
const unsigned int  i 
) const [inline, inherited]
std::istream& read ( std::istream &  i) [inline, inherited]
std::istream& read ( std::istream &  i,
Rep &  n 
) const [inline, inherited]
Rep& convert ( Rep &  a,
const Rep &  b 
) const [inline, inherited]
XXX& convert ( XXX &  x,
const Rep &  a 
) const [inline, inherited]
Rep& assign ( Rep &  a,
const Rep &  b 
) const [inline, inherited]
const Rep& access ( const Rep &  a) const [inline, inherited]
Rep& mul ( Rep &  r,
const Rep &  a,
const Rep &  b 
) const [inline, inherited]
Rep& div ( Rep &  r,
const Rep &  a,
const Rep &  b 
) const [inline, inherited]
Rep& mod ( Rep &  r,
const Rep &  a,
const Rep &  b 
) const [inline, inherited]
Rep& add ( Rep &  r,
const Rep &  a,
const Rep &  b 
) const [inline, inherited]
Rep& sub ( Rep &  r,
const Rep &  a,
const Rep &  b 
) const [inline, inherited]
Rep& divmod ( Rep &  q,
Rep &  r,
const Rep &  a,
const Rep &  b 
) const [inline, inherited]
Rep& divexact ( Rep &  q,
const Rep &  a,
const Rep &  b 
) const [inline, inherited]
Rep& mulin ( Rep &  r,
const Rep &  a 
) const [inline, inherited]
Rep& divin ( Rep &  r,
const Rep &  a 
) const [inline, inherited]
Rep& modin ( Rep &  r,
const Rep &  a 
) const [inline, inherited]
Rep& addin ( Rep &  r,
const Rep &  a 
) const [inline, inherited]
Rep& subin ( Rep &  r,
const Rep &  a 
) const [inline, inherited]
Rep& axpy ( Rep &  r,
const Rep &  a,
const Rep &  b,
const Rep &  c 
) const [inline, inherited]
Rep& maxpy ( Rep &  r,
const Rep &  a,
const Rep &  b,
const Rep &  c 
) const [inline, inherited]
Rep& maxpyin ( Rep &  r,
const Rep &  a,
const Rep &  b 
) const [inline, inherited]
Rep& axmy ( Rep &  r,
const Rep &  a,
const Rep &  b,
const Rep &  c 
) const [inline, inherited]
Rep& axpyin ( Rep &  r,
const Rep &  a,
const Rep &  b 
) const [inline, inherited]
Rep& axmyin ( Rep &  r,
const Rep &  a,
const Rep &  b 
) const [inline, inherited]
Rep& neg ( Rep &  r,
const Rep &  a 
) const [inline, inherited]
Rep& negin ( Rep &  r) const [inline, inherited]
Rep& gcd ( Rep &  g,
Rep &  u,
Rep &  v,
const Rep &  a,
const Rep &  b 
) const [inline, inherited]
Rep& gcd ( Rep &  g,
const Rep &  a,
const Rep &  b 
) const [inline, inherited]
Rep& lcm ( Rep &  l,
const Rep &  a,
const Rep &  b 
) const [inline, inherited]
Rep& lcmin ( Rep &  l,
const Rep &  a 
) const [inline, inherited]
Rep& inv ( Rep &  u,
const Rep &  a,
const Rep &  b 
) const [inline, inherited]
Rep& invin ( Rep &  u,
const Rep &  b 
) const [inline, inherited]
Rep& pow ( Rep &  r,
const Rep &  n,
const long  l 
) const [inline, inherited]
Rep& pow ( Rep &  r,
const Rep &  n,
const unsigned long  l 
) const [inline, inherited]
Rep& pow ( Rep &  r,
const Rep &  n,
const int  l 
) const [inline, inherited]
Rep& pow ( Rep &  r,
const Rep &  n,
const unsigned int  l 
) const [inline, inherited]
Rep& sqrt ( Rep &  s,
const Rep &  n 
) const [inline, inherited]
Rep& sqrt ( Rep &  s,
Rep &  r,
const Rep &  n 
) const [inline, inherited]
long logp ( const Rep &  a,
const Rep &  p 
) const [inline, inherited]
Rep& powmod ( Rep &  r,
const Rep &  n,
const long  e,
const Rep &  m 
) const [inline, inherited]
Rep& powmod ( Rep &  r,
const Rep &  n,
const Rep &  e,
const Rep &  m 
) const [inline, inherited]
unsigned long length ( const Rep &  a) const [inline, inherited]
int sign ( const Rep &  a) const [inline, inherited]
bool isZero ( const Rep &  a) const [inline, inherited]
bool isOne ( const Rep &  a) const [inline, inherited]
bool areEqual ( const Rep &  a,
const Rep &  b 
) const [inline, inherited]
bool areNEqual ( const Rep &  a,
const Rep &  b 
) const [inline, inherited]
bool isgeq ( const Rep &  a,
const Rep &  b 
) const [inline, inherited]
bool isgeq ( const long  b,
const Rep &  a 
) const [inline, inherited]
bool isgeq ( const Rep &  a,
const long  b 
) const [inline, inherited]
bool isleq ( const Rep &  a,
const Rep &  b 
) const [inline, inherited]
bool isleq ( const long  b,
const Rep &  a 
) const [inline, inherited]
bool isleq ( const Rep &  a,
const long  b 
) const [inline, inherited]
bool isgt ( const Rep &  a,
const Rep &  b 
) const [inline, inherited]
bool isgt ( const long  b,
const Rep &  a 
) const [inline, inherited]
bool isgt ( const Rep &  a,
const long  b 
) const [inline, inherited]
bool islt ( const Rep &  a,
const Rep &  b 
) const [inline, inherited]
bool islt ( const long  b,
const Rep &  a 
) const [inline, inherited]
bool islt ( const Rep &  a,
const long  b 
) const [inline, inherited]
Rep& random ( RandIter &  ,
Rep &  r,
long  s = 1 
) const [inline, inherited]
Rep& random ( RandIter &  ,
Rep &  r,
const Rep &  b 
) const [inline, inherited]
Rep& nonzerorandom ( RandIter &  ,
Rep &  r,
long  s = 1 
) const [inline, inherited]
Rep& nonzerorandom ( RandIter &  ,
Rep &  r,
const Rep &  b 
) const [inline, inherited]
std::ostream& write ( std::ostream &  o) const [inline, inherited]
std::ostream& write ( std::ostream &  o,
const Rep &  n 
) const [inline, inherited]

Field Documentation

const Integer one [inherited]
const Integer zero [inherited]

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