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

Integer Domain. More...

#include <givinteger.h>

+ Inheritance diagram for IntegerDom:
+ Collaboration diagram for IntegerDom:

Public Types

typedef Integer Rep
typedef Rep Element

Public Member Functions

 IntegerDom ()
 IntegerDom (const IntegerDom &)
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
Rep & convert (Rep &a, const Rep &b) const
Rep & assign (Rep &a, const Rep &b) const
const Rep & access (const Rep &a) const
template<class XXX >
XXX & convert (XXX &x, 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 isleq (const Rep &a, const Rep &b) const
bool isgeq (const long b, const Rep &a) const
bool isleq (const long b, const Rep &a) const
bool isgeq (const Rep &a, const long b) const
bool isleq (const Rep &a, const long b) const
bool isgt (const Rep &a, const Rep &b) const
bool islt (const Rep &a, const Rep &b) const
bool isgt (const long b, const Rep &a) const
bool islt (const long b, const Rep &a) const
bool isgt (const Rep &a, const long b) 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::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

Data Fields

const Integer one
const Integer mOne
const Integer zero

Detailed Description

Integer Domain.

Examples:
examples/Integer/igcd.C, examples/Integer/igcdext.C, examples/Integer/ilcm.C, examples/Integer/lambda.C, examples/Integer/lambda_inv.C, examples/Integer/phi.C, examples/Integer/primitiveelement.C, and examples/Integer/probable_primroot.C.

Member Typedef Documentation

typedef Integer Rep
typedef Rep Element

Constructor & Destructor Documentation

IntegerDom ( )
inline
IntegerDom ( const IntegerDom &  )
inline

Member Function Documentation

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

Field Documentation

const Integer one
const Integer mOne
const Integer zero

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