Main Page   Modules   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

Integer Class Reference

#include <gmp++_int.h>

List of all members.

Public Types

typedef std::vector< mp_limb_t > vect_t

Public Methods

 Integer (const std::vector< mp_limb_t > &vect_t)
 Integer (int n=0)
 Integer (long n)
 Integer (unsigned char n)
 Integer (unsigned int n)
 Integer (unsigned long n)
 Integer (long long n)
 Integer (unsigned long long n)
 Integer (double d)
 Integer (const char *s)
 Integer (const Integer &n)
 ~Integer ()
Integer & operator= (const Integer &n)
Integer & logcpy (const Integer &n)
Integer & copy (const Integer &n)
int operator!= (const int l) const
int operator!= (const long l) const
int operator!= (const unsigned long l) const
int operator> (const int l) const
int operator> (const long l) const
int operator< (const int l) const
int operator< (const long l) const
int operator> (const unsigned long l) const
int operator< (const unsigned long l) const
Integer & operator+= (const Integer &n)
Integer & operator+= (const unsigned long l)
Integer & operator+= (const long l)
Integer operator+ (const Integer &n) const
Integer operator+ (const unsigned long l) const
Integer operator+ (const long l) const
template<class XXX> Integer & operator+= (const XXX &x)
Integer & operator-= (const Integer &n)
Integer & operator-= (const unsigned long l)
Integer & operator-= (const long l)
template<class XXX> Integer & operator-= (const XXX &x)
Integer operator- (const Integer &n) const
Integer operator- (const unsigned long l) const
Integer operator- (const long l) const
Integer operator- () const
Integer & operator *= (const Integer &n)
Integer & operator *= (const unsigned long l)
Integer & operator *= (const long l)
template<class XXX> Integer & operator *= (const XXX &x)
Integer operator * (const Integer &n) const
Integer operator * (const unsigned long l) const
Integer operator * (const long l) const
Integer & operator/= (const Integer &n)
Integer & operator/= (const unsigned long l)
Integer & operator/= (const long l)
template<class XXX> Integer & operator/= (const XXX &x)
Integer operator/ (const Integer &n) const
Integer operator/ (const unsigned long l) const
Integer operator/ (const long l) const
Integer & operator%= (const Integer &n)
Integer & operator%= (const unsigned long l)
Integer & operator%= (const long l)
Integer & operator%= (const long long l)
Integer & operator%= (const unsigned long long l)
long long operator% (const long long l) const
long long operator% (const unsigned long long l) const
template<class XXX> Integer & operator%= (const XXX &x)
Integer operator% (const Integer &n) const
long operator% (const unsigned long l) const
long operator% (const long l) const
Integer & operator++ ()
Integer & operator-- ()
Integer operator<< (int l) const
Integer operator>> (int l) const
Integer operator<< (long l) const
Integer operator>> (long l) const
Integer operator<< (unsigned int l) const
Integer operator>> (unsigned int l) const
Integer operator<< (unsigned long l) const
Integer operator>> (unsigned long l) const
Integer & operator<<= (int l)
Integer & operator>>= (int l)
Integer & operator<<= (long l)
Integer & operator>>= (long l)
Integer & operator<<= (unsigned int l)
Integer & operator>>= (unsigned int l)
Integer & operator<<= (unsigned long l)
Integer & operator>>= (unsigned long l)
size_t size () const
size_t size_in_base (int B) const
size_t bitsize () const
unsigned long operator[] (size_t i) const
 operator short () const
 operator unsigned short () const
 operator unsigned char () const
 operator signed char () const
 operator unsigned int () const
 operator int () const
 operator unsigned long () const
 operator long () const
 operator unsigned long long () const
 operator long long () const
 operator std::string () const
 operator float () const
 operator double () const
 operator vect_t () const
std::ostream & print (std::ostream &o) const
mpz_ptr get_mpz ()
const Repget_rep () const

Static Public Methods

Integer & addin (Integer &res, const Integer &n)
Integer & addin (Integer &res, const long n)
Integer & addin (Integer &res, const unsigned long n)
Integer & add (Integer &res, const Integer &n1, const Integer &n2)
Integer & add (Integer &res, const Integer &n1, const long n2)
Integer & add (Integer &res, const Integer &n1, const unsigned long n2)
Integer & subin (Integer &res, const Integer &n)
Integer & subin (Integer &res, const long n)
Integer & subin (Integer &res, const unsigned long n)
Integer & sub (Integer &res, const Integer &n1, const Integer &n2)
Integer & sub (Integer &res, const Integer &n1, const long n2)
Integer & sub (Integer &res, const Integer &n1, const unsigned long n2)
Integer & negin (Integer &res)
Integer & neg (Integer &res, const Integer &n)
Integer & mulin (Integer &res, const Integer &n)
Integer & mulin (Integer &res, const long n)
Integer & mulin (Integer &res, const unsigned long n)
Integer & mul (Integer &res, const Integer &n1, const Integer &n2)
Integer & mul (Integer &res, const Integer &n1, const long n2)
Integer & mul (Integer &res, const Integer &n1, const unsigned long n2)
Integer & axpy (Integer &res, const Integer &a, const Integer &x, const Integer &y)
Integer & axpyin (Integer &res, const Integer &a, const Integer &x)
Integer & axmy (Integer &res, const Integer &a, const Integer &x, const Integer &y)
Integer & axmyin (Integer &res, const Integer &a, const Integer &x)
Integer & divin (Integer &q, const Integer &n)
Integer & divin (Integer &q, const long n)
Integer & divin (Integer &q, const unsigned long n)
Integer & div (Integer &q, const Integer &n1, const Integer &n2)
Integer & div (Integer &q, const Integer &n1, const long n2)
Integer & div (Integer &q, const Integer &n1, const unsigned long n2)
Integer & divexact (Integer &q, const Integer &n1, const Integer &n2)
Integer divexact (const Integer &n1, const Integer &n2)
Integer & modin (Integer &r, const Integer &n)
Integer & modin (Integer &r, const long n)
Integer & modin (Integer &r, const unsigned long n)
Integer & mod (Integer &r, const Integer &n1, const Integer &n2)
Integer & mod (Integer &r, const Integer &n1, const long n2)
Integer & mod (Integer &r, const Integer &n1, const unsigned long n2)
Integer & divmod (Integer &q, Integer &r, const Integer &n1, const Integer &n2)
Integer & divmod (Integer &q, long &r, const Integer &n1, const long n2)
Integer & divmod (Integer &q, unsigned long &r, const Integer &n1, const unsigned long n2)
Integer random (int sz=1)
Integer nonzerorandom (int sz=1)
Integer & random (Integer &r, const Integer &size)
Integer & nonzerorandom (Integer &r, const Integer &size)
Integer & random (Integer &r, long size=1)
Integer & nonzerorandom (Integer &r, long size=1)

Static Public Attributes

const Integer zero
const Integer one

Protected Types

typedef MP_INT Rep

Protected Methods

int priv_sign () const
 Integer (unsigned long *d, long size)

Protected Attributes

Rep gmp_rep

Friends

int compare (const Integer &a, const Integer &b)
int absCompare (const Integer &a, const Integer &b)
Integer & inv (Integer &u, const Integer &a, const Integer &b)
Integer gcd (const Integer &a, const Integer &b)
Integer gcd (const Integer &a, const Integer &b, Integer &u, Integer &v)
Integer & gcd (Integer &g, const Integer &a, const Integer &b)
Integer & gcd (Integer &g, const Integer &a, const Integer &b, Integer &u, Integer &v)
Integer pp (const Integer &P, const Integer &Q)
Integer & lcm (Integer &g, const Integer &a, const Integer &b)
Integer lcm (const Integer &a, const Integer &b)
Integer & pow (Integer &Res, const Integer &n, const long l)
Integer & pow (Integer &Res, const unsigned long n, const unsigned long l)
Integer & pow (Integer &Res, const Integer &n, const unsigned long l)
Integer & pow (Integer &Res, const Integer &n, const int l)
Integer & pow (Integer &Res, const Integer &n, const unsigned int l)
Integer pow (const Integer &n, const long l)
Integer pow (const Integer &n, const unsigned long l)
Integer pow (const Integer &n, const int l)
Integer pow (const Integer &n, const unsigned int l)
Integer & powmod (Integer &Res, const Integer &n, const unsigned long e, const Integer &m)
Integer & powmod (Integer &Res, const Integer &n, const long e, const Integer &m)
Integer & powmod (Integer &Res, const Integer &n, const unsigned int e, const Integer &m)
Integer & powmod (Integer &Res, const Integer &n, const int e, const Integer &m)
Integer & powmod (Integer &Res, const Integer &n, const Integer &e, const Integer &m)
Integer powmod (const Integer &n, const unsigned long e, const Integer &m)
Integer powmod (const Integer &n, const long e, const Integer &m)
Integer powmod (const Integer &n, const unsigned int e, const Integer &m)
Integer powmod (const Integer &n, const int e, const Integer &m)
Integer powmod (const Integer &n, const Integer &e, const Integer &m)
Integer fact (unsigned long l)
Integer sqrt (const Integer &p)
Integer sqrt (const Integer &p, Integer &r)
bool root (Integer &q, const Integer &, unsigned int n)
long logp (const Integer &a, const Integer &p)
double logtwo (const Integer &a)
void swap (Integer &, Integer &)
int sign (const Integer &a)
int isZero (const Integer &a)
int isOne (const Integer &a)
int isperfectpower (const Integer &)
Integer abs (const Integer &n)
Integer & nextprime (Integer &, const Integer &p)
Integer & prevprime (Integer &, const Integer &p)
int probab_prime (const Integer &p)
int probab_prime (const Integer &p, int r)
int jacobi (const Integer &u, const Integer &v)
int legendre (const Integer &u, const Integer &v)
unsigned long length (const Integer &a)
long Integer2long (const Integer &n)
vect_tInteger2vector (vect_t &v, const Integer &n)
double Integer2double (const Integer &n)
std::string & Integer2string (std::string &, const Integer &, int base=10)
std::istream & operator>> (std::istream &i, Integer &n)
std::ostream & operator<< (std::ostream &o, const Integer &n)
std::ostream & absOutput (std::ostream &o, const Integer &n)
void importWords (Integer &x, size_t count, int order, int size, int endian, size_t nails, const void *op)


Member Typedef Documentation

typedef MP_INT Rep [protected]
 

typedef std::vector<mp_limb_t> vect_t
 


Constructor & Destructor Documentation

Integer const std::vector< mp_limb_t > &    vect_t
 

Integer int    n = 0 [inline]
 

Integer long    n [inline]
 

Integer unsigned char    n [inline]
 

Integer unsigned int    n [inline]
 

Integer unsigned long    n [inline]
 

Integer long long    n
 

Integer unsigned long long    n
 

Integer double    d [inline]
 

Integer const char *    s
 

Integer const Integer &    n [inline]
 

~Integer   [inline]
 

Integer unsigned long *    d,
long    size
[protected]
 


Member Function Documentation

Integer & add Integer &    res,
const Integer &    n1,
const unsigned long    n2
[static]
 

Integer & add Integer &    res,
const Integer &    n1,
const long    n2
[static]
 

Integer & add Integer &    res,
const Integer &    n1,
const Integer &    n2
[static]
 

Integer & addin Integer &    res,
const unsigned long    n
[static]
 

Integer & addin Integer &    res,
const long    n
[static]
 

Integer & addin Integer &    res,
const Integer &    n
[static]
 

Integer & axmy Integer &    res,
const Integer &    a,
const Integer &    x,
const Integer &    y
[static]
 

Integer & axmyin Integer &    res,
const Integer &    a,
const Integer &    x
[static]
 

Integer & axpy Integer &    res,
const Integer &    a,
const Integer &    x,
const Integer &    y
[static]
 

Integer & axpyin Integer &    res,
const Integer &    a,
const Integer &    x
[static]
 

size_t bitsize   [inline]
 

Integer & copy const Integer &    n
 

Integer & div Integer &    q,
const Integer &    n1,
const unsigned long    n2
[static]
 

Integer & div Integer &    q,
const Integer &    n1,
const long    n2
[static]
 

Integer & div Integer &    q,
const Integer &    n1,
const Integer &    n2
[static]
 

Integer divexact const Integer &    n1,
const Integer &    n2
[static]
 

Integer & divexact Integer &    q,
const Integer &    n1,
const Integer &    n2
[static]
 

Integer & divin Integer &    q,
const unsigned long    n
[static]
 

Integer & divin Integer &    q,
const long    n
[static]
 

Integer & divin Integer &    q,
const Integer &    n
[static]
 

Integer & divmod Integer &    q,
unsigned long &    r,
const Integer &    n1,
const unsigned long    n2
[static]
 

Integer & divmod Integer &    q,
long &    r,
const Integer &    n1,
const long    n2
[static]
 

Integer & divmod Integer &    q,
Integer &    r,
const Integer &    n1,
const Integer &    n2
[static]
 

mpz_ptr get_mpz   [inline]
 

const Rep* get_rep   const [inline]
 

Integer & logcpy const Integer &    n [inline]
 

Integer & mod Integer &    r,
const Integer &    n1,
const unsigned long    n2
[static]
 

Integer & mod Integer &    r,
const Integer &    n1,
const long    n2
[static]
 

Integer & mod Integer &    r,
const Integer &    n1,
const Integer &    n2
[static]
 

Integer & modin Integer &    r,
const unsigned long    n
[static]
 

Integer & modin Integer &    r,
const long    n
[static]
 

Integer & modin Integer &    r,
const Integer &    n
[static]
 

Integer & mul Integer &    res,
const Integer &    n1,
const unsigned long    n2
[static]
 

Integer & mul Integer &    res,
const Integer &    n1,
const long    n2
[static]
 

Integer & mul Integer &    res,
const Integer &    n1,
const Integer &    n2
[static]
 

Integer & mulin Integer &    res,
const unsigned long    n
[static]
 

Integer & mulin Integer &    res,
const long    n
[static]
 

Integer & mulin Integer &    res,
const Integer &    n
[static]
 

Integer & neg Integer &    res,
const Integer &    n
[static]
 

Integer & negin Integer &    res [static]
 

Integer & nonzerorandom Integer &    r,
long    size = 1
[inline, static]
 

Integer & nonzerorandom Integer &    r,
const Integer &    size
[inline, static]
 

Integer nonzerorandom int    sz = 1 [inline, static]
 

Integer operator * const long    l const
 

Integer operator * const unsigned long    l const
 

Integer operator * const Integer &    n const
 

Integer& operator *= const XXX &    x [inline]
 

Integer & operator *= const long    l
 

Integer & operator *= const unsigned long    l
 

Integer & operator *= const Integer &    n
 

operator double  
 

operator float  
 

operator int  
 

operator long  
 

operator long long  
 

operator short   const [inline]
 

operator signed char   const [inline]
 

operator std::string  
 

operator unsigned char   const [inline]
 

operator unsigned int  
 

operator unsigned long  
 

operator unsigned long long  
 

operator unsigned short   const [inline]
 

operator vect_t  
 

int operator!= const unsigned long    l const
 

int operator!= const long    l const
 

int operator!= const int    l const
 

long operator% const long    l const
 

long operator% const unsigned long    l const
 

Integer operator% const Integer &    n const
 

long operator% const unsigned long long    l const
 

long operator% const long long    l const
 

Integer& operator%= const XXX &    x [inline]
 

Integer& operator%= const unsigned long long    l [inline]
 

Integer& operator%= const long long    l [inline]
 

Integer & operator%= const long    l
 

Integer & operator%= const unsigned long    l
 

Integer & operator%= const Integer &    n
 

Integer operator+ const long    l const
 

Integer operator+ const unsigned long    l const
 

Integer operator+ const Integer &    n const
 

Integer& operator++   [inline]
 

Integer& operator+= const XXX &    x [inline]
 

Integer & operator+= const long    l
 

Integer & operator+= const unsigned long    l
 

Integer & operator+= const Integer &    n
 

Integer operator-   [inline]
 

Integer operator- const long    l const
 

Integer operator- const unsigned long    l const
 

Integer operator- const Integer &    n const
 

Integer& operator--   [inline]
 

Integer& operator-= const XXX &    x [inline]
 

Integer & operator-= const long    l
 

Integer & operator-= const unsigned long    l
 

Integer & operator-= const Integer &    n
 

Integer operator/ const long    l const
 

Integer operator/ const unsigned long    l const
 

Integer operator/ const Integer &    n const
 

Integer& operator/= const XXX &    x [inline]
 

Integer & operator/= const long    l
 

Integer & operator/= const unsigned long    l
 

Integer & operator/= const Integer &    n
 

int operator< const unsigned long    l const
 

int operator< const long    l const
 

int operator< const int    l const
 

Integer operator<< unsigned long    l const
 

Integer operator<< unsigned int    l const
 

Integer operator<< long    l const
 

Integer operator<< int    l const
 

Integer & operator<<= unsigned long    l
 

Integer & operator<<= unsigned int    l
 

Integer & operator<<= long    l
 

Integer & operator<<= int    l
 

Integer & operator= const Integer &    n [inline]
 

int operator> const unsigned long    l const
 

int operator> const long    l const
 

int operator> const int    l const
 

Integer operator>> unsigned long    l const
 

Integer operator>> unsigned int    l const
 

Integer operator>> long    l const
 

Integer operator>> int    l const
 

Integer & operator>>= unsigned long    l
 

Integer & operator>>= unsigned int    l
 

Integer & operator>>= long    l
 

Integer & operator>>= int    l
 

unsigned long operator[] size_t    i const [inline]
 

std::ostream & print std::ostream &    o const
 

int priv_sign   [inline, protected]
 

Integer & random Integer &    r,
long    size = 1
[inline, static]
 

Integer & random Integer &    r,
const Integer &    size
[inline, static]
 

Integer random int    sz = 1 [inline, static]
 

size_t size   [inline]
 

size_t size_in_base int    B const [inline]
 

Integer & sub Integer &    res,
const Integer &    n1,
const unsigned long    n2
[static]
 

Integer & sub Integer &    res,
const Integer &    n1,
const long    n2
[static]
 

Integer & sub Integer &    res,
const Integer &    n1,
const Integer &    n2
[static]
 

Integer & subin Integer &    res,
const unsigned long    n
[static]
 

Integer & subin Integer &    res,
const long    n
[static]
 

Integer & subin Integer &    res,
const Integer &    n
[static]
 


Friends And Related Function Documentation

Integer abs const Integer &    n [friend]
 

int absCompare const Integer &    a,
const Integer &    b
[friend]
 

std::ostream& absOutput std::ostream &    o,
const Integer &    n
[friend]
 

int compare const Integer &    a,
const Integer &    b
[friend]
 

Integer fact unsigned long    l [friend]
 

Integer& gcd Integer &    g,
const Integer &    a,
const Integer &    b,
Integer &    u,
Integer &    v
[friend]
 

Integer& gcd Integer &    g,
const Integer &    a,
const Integer &    b
[friend]
 

Integer gcd const Integer &    a,
const Integer &    b,
Integer &    u,
Integer &    v
[friend]
 

Integer gcd const Integer &    a,
const Integer &    b
[friend]
 

void importWords Integer &    x,
size_t    count,
int    order,
int    size,
int    endian,
size_t    nails,
const void *    op
[friend]
 

double Integer2double const Integer &    n [friend]
 

long Integer2long const Integer &    n [friend]
 

std::string& Integer2string std::string &    s,
const Integer &    n,
int    base = 10
[friend]
 

vect_t& Integer2vector vect_t   v,
const Integer &    n
[friend]
 

Integer& inv Integer &    u,
const Integer &    a,
const Integer &    b
[friend]
 

int isOne const Integer &    a [friend]
 

int isperfectpower const Integer &    n [friend]
 

int isZero const Integer &    a [friend]
 

int jacobi const Integer &    u,
const Integer &    v
[friend]
 

Integer lcm const Integer &    a,
const Integer &    b
[friend]
 

Integer& lcm Integer &    g,
const Integer &    a,
const Integer &    b
[friend]
 

int legendre const Integer &    u,
const Integer &    v
[friend]
 

unsigned long length const Integer &    a [friend]
 

long logp const Integer &    a,
const Integer &    p
[friend]
 

double logtwo const Integer &    a [friend]
 

Integer& nextprime Integer &    r,
const Integer &    p
[friend]
 

std::ostream& operator<< std::ostream &    o,
const Integer &    a
[friend]
 

std::istream& operator>> std::istream &    in,
Integer &    a
[friend]
 

Integer pow const Integer &    n,
const unsigned int    l
[friend]
 

Integer pow const Integer &    n,
const int    l
[friend]
 

Integer pow const Integer &    n,
const unsigned long    p
[friend]
 

Integer pow const Integer &    n,
const long    l
[friend]
 

Integer& pow Integer &    Res,
const Integer &    n,
const unsigned int    l
[friend]
 

Integer& pow Integer &    Res,
const Integer &    n,
const int    l
[friend]
 

Integer& pow Integer &    Res,
const Integer &    n,
const unsigned long    p
[friend]
 

Integer& pow Integer &    Res,
const unsigned long    n,
const unsigned long    p
[friend]
 

Integer& pow Integer &    Res,
const Integer &    n,
const long    l
[friend]
 

Integer powmod const Integer &    n,
const Integer &    e,
const Integer &    m
[friend]
 

Integer powmod const Integer &    n,
const int    e,
const Integer &    m
[friend]
 

Integer powmod const Integer &    n,
const unsigned int    e,
const Integer &    m
[friend]
 

Integer powmod const Integer &    n,
const long    e,
const Integer &    m
[friend]
 

Integer powmod const Integer &    n,
const unsigned long    p,
const Integer &    m
[friend]
 

Integer& powmod Integer &    Res,
const Integer &    n,
const Integer &    e,
const Integer &    m
[friend]
 

Integer& powmod Integer &    Res,
const Integer &    n,
const int    e,
const Integer &    m
[friend]
 

Integer& powmod Integer &    Res,
const Integer &    n,
const unsigned int    e,
const Integer &    m
[friend]
 

Integer& powmod Integer &    Res,
const Integer &    n,
const long    e,
const Integer &    m
[friend]
 

Integer& powmod Integer &    Res,
const Integer &    n,
const unsigned long    p,
const Integer &    m
[friend]
 

Integer pp const Integer &    P,
const Integer &    Q
[friend]
 

Integer& prevprime Integer &    r,
const Integer &    p
[friend]
 

int probab_prime const Integer &    p,
int    r
[friend]
 

int probab_prime const Integer &    p [friend]
 

bool root Integer &    q,
const Integer &    a,
unsigned int    n
[friend]
 

int sign const Integer &    a [friend]
 

Integer sqrt const Integer &    a,
Integer &    r
[friend]
 

Integer sqrt const Integer &    a [friend]
 

void swap Integer &    a,
Integer &    b
[friend]
 


Member Data Documentation

Rep gmp_rep [protected]
 

const Integer one [static]
 

const Integer zero [static]
 


Generated on Mon Jun 20 09:16:51 2005 for linbox by doxygen1.2.18