Givaro
Public Types | Static Public Member Functions | Static Public Attributes | Protected Types | Protected Member Functions | Protected Attributes | Friends
SpyInteger::InHeritsInteger Struct Reference

#include <givspyinteger.h>

+ Inheritance diagram for SpyInteger::InHeritsInteger:
+ Collaboration diagram for SpyInteger::InHeritsInteger:

Public Types

typedef std::vector< mp_limb_t > vect_t
 vector of limbs (ie a gmp number). More...
 

Public Member Functions

Assignment and copy operators
giv_all_inlined Integerlogcpy (const Integer &n)
 copy from an integer. More...
 
giv_all_inlined Integercopy (const Integer &n)
 copy from an integer. More...
 
Comparison operators.

Compare with operators.

giv_all_inlined int32_t operator>= (const Integer &l) const
 greater or equal. More...
 
giv_all_inlined int32_t operator>= (const int32_t l) const
 greater or equal. More...
 
giv_all_inlined int32_t operator>= (const int64_t l) const
 greater or equal. More...
 
giv_all_inlined int32_t operator>= (const uint64_t l) const
 greater or equal. More...
 
giv_all_inlined int32_t operator>= (const uint32_t l) const
 greater or equal. More...
 
giv_all_inlined int32_t operator>= (const double l) const
 greater or equal. More...
 
giv_all_inlined int32_t operator>= (const float l) const
 greater or equal. More...
 
giv_all_inlined int32_t operator<= (const Integer &l) const
 less or equal More...
 
giv_all_inlined int32_t operator<= (const int32_t l) const
 greater or equal. More...
 
giv_all_inlined int32_t operator<= (const int64_t l) const
 greater or equal. More...
 
giv_all_inlined int32_t operator<= (const uint64_t l) const
 greater or equal. More...
 
giv_all_inlined int32_t operator<= (const uint32_t l) const
 greater or equal. More...
 
giv_all_inlined int32_t operator<= (const double l) const
 greater or equal. More...
 
giv_all_inlined int32_t operator<= (const float l) const
 greater or equal. More...
 
giv_all_inlined int32_t operator!= (const Integer &l) const
 operator != (not equal) More...
 
giv_all_inlined int32_t operator!= (const int32_t l) const
 greater or equal. More...
 
giv_all_inlined int32_t operator!= (const int64_t l) const
 greater or equal. More...
 
giv_all_inlined int32_t operator!= (const uint64_t l) const
 greater or equal. More...
 
giv_all_inlined int32_t operator!= (const uint32_t l) const
 greater or equal. More...
 
giv_all_inlined int32_t operator!= (const double l) const
 greater or equal. More...
 
giv_all_inlined int32_t operator!= (const float l) const
 greater or equal. More...
 
giv_all_inlined int32_t operator== (const Integer &l) const
 Equality. More...
 
giv_all_inlined int32_t operator== (const int32_t l) const
 greater or equal. More...
 
giv_all_inlined int32_t operator== (const int64_t l) const
 greater or equal. More...
 
giv_all_inlined int32_t operator== (const uint64_t l) const
 greater or equal. More...
 
giv_all_inlined int32_t operator== (const uint32_t l) const
 greater or equal. More...
 
giv_all_inlined int32_t operator== (const double l) const
 greater or equal. More...
 
giv_all_inlined int32_t operator== (const float l) const
 greater or equal. More...
 
giv_all_inlined int32_t operator> (const Integer &l) const
 greater (strict) More...
 
giv_all_inlined int32_t operator> (const int32_t l) const
 greater or equal. More...
 
giv_all_inlined int32_t operator> (const int64_t l) const
 greater or equal. More...
 
giv_all_inlined int32_t operator> (const uint64_t l) const
 greater or equal. More...
 
giv_all_inlined int32_t operator> (const uint32_t l) const
 greater or equal. More...
 
giv_all_inlined int32_t operator> (const double l) const
 greater or equal. More...
 
giv_all_inlined int32_t operator> (const float l) const
 greater or equal. More...
 
giv_all_inlined int32_t operator< (const Integer &l) const
 less (strict) More...
 
giv_all_inlined int32_t operator< (const int32_t l) const
 greater or equal. More...
 
giv_all_inlined int32_t operator< (const int64_t l) const
 greater or equal. More...
 
giv_all_inlined int32_t operator< (const uint64_t l) const
 greater or equal. More...
 
giv_all_inlined int32_t operator< (const uint32_t l) const
 greater or equal. More...
 
giv_all_inlined int32_t operator< (const double l) const
 greater or equal. More...
 
giv_all_inlined int32_t operator< (const float l) const
 greater or equal. More...
 
Bit logic operators. <br>
giv_all_inlined Integer operator^ (const Integer &a) const
 XOR (^) More...
 
giv_all_inlined Integer operator^ (const uint64_t &a) const
 XOR (^) More...
 
giv_all_inlined Integer operator^ (const uint32_t &a) const
 XOR (^) More...
 
giv_all_inlined Integeroperator^= (const Integer &a)
 XOR inplace (^=) More...
 
giv_all_inlined Integeroperator^= (const uint64_t &a)
 XOR (^) More...
 
giv_all_inlined Integeroperator^= (const uint32_t &a)
 XOR (^) More...
 
giv_all_inlined Integer operator| (const Integer &a) const
 OR (|) More...
 
giv_all_inlined Integer operator| (const uint64_t &a) const
 XOR (^) More...
 
giv_all_inlined Integer operator| (const uint32_t &a) const
 XOR (^) More...
 
giv_all_inlined Integeroperator|= (const Integer &a)
 OR inplace (|=) More...
 
giv_all_inlined Integeroperator|= (const uint64_t &a)
 XOR (^) More...
 
giv_all_inlined Integeroperator|= (const uint32_t &a)
 XOR (^) More...
 
giv_all_inlined Integer operator& (const Integer &a) const
 AND (&) More...
 
giv_all_inlined uint32_t operator& (const uint32_t &a) const
 XOR (^) More...
 
giv_all_inlined uint64_t operator& (const uint64_t &a) const
 XOR (^) More...
 
giv_all_inlined Integeroperator&= (const Integer &a)
 AND inplace (&=) More...
 
giv_all_inlined Integeroperator&= (const uint64_t &a)
 XOR (^) More...
 
giv_all_inlined Integeroperator&= (const uint32_t &a)
 XOR (^) More...
 
giv_all_inlined Integer operator~ () const
 complement to 1 (~) More...
 
giv_all_inlined Integer operator<< (int32_t l) const
 left shift (<<) More...
 
giv_all_inlined Integer operator<< (int64_t l) const
 XOR (^) More...
 
giv_all_inlined Integer operator<< (uint32_t l) const
 XOR (^) More...
 
giv_all_inlined Integer operator<< (uint64_t l) const
 XOR (^) More...
 
giv_all_inlined Integeroperator<<= (int32_t l)
 left shift inplace (<<=) More...
 
giv_all_inlined Integeroperator<<= (int64_t l)
 XOR (^) More...
 
giv_all_inlined Integeroperator<<= (uint32_t l)
 XOR (^) More...
 
giv_all_inlined Integeroperator<<= (uint64_t l)
 XOR (^) More...
 
giv_all_inlined Integer operator>> (int32_t l) const
 right shift (>>) More...
 
giv_all_inlined Integer operator>> (int64_t l) const
 XOR (^) More...
 
giv_all_inlined Integer operator>> (uint32_t l) const
 XOR (^) More...
 
giv_all_inlined Integer operator>> (uint64_t l) const
 XOR (^) More...
 
giv_all_inlined Integeroperator>>= (int32_t l)
 right shift inplace (>>=) More...
 
giv_all_inlined Integeroperator>>= (int64_t l)
 XOR (^) More...
 
giv_all_inlined Integeroperator>>= (uint32_t l)
 XOR (^) More...
 
giv_all_inlined Integeroperator>>= (uint64_t l)
 XOR (^) More...
 
Addition, substraction, multiplication operators
giv_all_inlined Integer operator+ (const Integer &n) const
 operator +. More...
 
giv_all_inlined Integer operator+ (const uint64_t n) const
 operator +. More...
 
giv_all_inlined Integer operator+ (const int64_t n) const
 operator +. More...
 
giv_all_inlined Integer operator+ (const uint32_t n) const
 operator +. More...
 
giv_all_inlined Integer operator+ (const int32_t n) const
 operator +. More...
 
giv_all_inlined Integeroperator+= (const Integer &n)
 operator += . More...
 
giv_all_inlined Integeroperator+= (const uint64_t n)
 operator +. More...
 
giv_all_inlined Integeroperator+= (const int64_t n)
 operator +. More...
 
giv_all_inlined Integeroperator+= (const uint32_t n)
 operator +. More...
 
giv_all_inlined Integeroperator+= (const int32_t n)
 operator +. More...
 
template<class XXX >
Integeroperator+= (const XXX &n)
 operator +. More...
 
giv_all_inlined Integer operator- (const Integer &n) const
 operator -. More...
 
giv_all_inlined Integer operator- (const uint64_t n) const
 operator +. More...
 
giv_all_inlined Integer operator- (const int64_t n) const
 operator +. More...
 
giv_all_inlined Integer operator- (const uint32_t n) const
 operator +. More...
 
giv_all_inlined Integer operator- (const int32_t n) const
 operator +. More...
 
giv_all_inlined Integer operator- () const
 Opposite. More...
 
giv_all_inlined Integeroperator-= (const Integer &n)
 operator -= . More...
 
giv_all_inlined Integeroperator-= (const uint64_t n)
 operator +. More...
 
giv_all_inlined Integeroperator-= (const int64_t n)
 operator +. More...
 
giv_all_inlined Integeroperator-= (const uint32_t n)
 operator +. More...
 
giv_all_inlined Integeroperator-= (const int32_t n)
 operator +. More...
 
template<class XXX >
Integeroperator-= (const XXX &n)
 operator +. More...
 
giv_all_inlined Integer operator* (const Integer &n) const
 operator *. More...
 
giv_all_inlined Integer operator* (const uint64_t n) const
 operator +. More...
 
giv_all_inlined Integer operator* (const int64_t n) const
 operator +. More...
 
giv_all_inlined Integer operator* (const uint32_t n) const
 operator +. More...
 
giv_all_inlined Integer operator* (const int32_t n) const
 operator +. More...
 
giv_all_inlined Integeroperator*= (const Integer &n)
 operator *= . More...
 
giv_all_inlined Integeroperator*= (const uint64_t n)
 operator +. More...
 
giv_all_inlined Integeroperator*= (const int64_t n)
 operator +. More...
 
giv_all_inlined Integeroperator*= (const uint32_t n)
 operator +. More...
 
giv_all_inlined Integeroperator*= (const int32_t n)
 operator +. More...
 
template<class XXX >
Integeroperator*= (const XXX &n)
 operator +. More...
 
Miscellaneous.
int32_t sign () const
 sign More...
 
int32_t priv_sign () const
 private sign More...
 
representation

get representation

mpz_ptr get_mpz ()
 get representation (constant) More...
 
mpz_srcptr get_mpz () const
 get representation (constant) More...
 
mpz_srcptr get_mpz_const () const
 get representation (constant) More...
 
giv_all_inlined size_t size () const
 returns the number of machine words used to store *this
More...
 
giv_all_inlined size_t size_in_base (int32_t B) const
 returns ceil(log_BASE(*this)). More...
 
giv_all_inlined size_t bitsize () const
 returns ceil(log_2(*this)) . More...
 
giv_all_inlined uint64_t operator[] (size_t i) const
 return the i-th word of the integer. More...
 
Increment/Decrement operators
Integeroperator++ ()
 
Integer operator++ (int)
 
Integeroperator-- ()
 
Integer operator-- (int)
 
Cast operators.

Convert an Integer to a basic C++ type.

Warning
Cast towards unsigned consider only the absolute value
 operator bool () const
 
 operator int16_t () const
 
 operator uint16_t () const
 
 operator unsigned char () const
 
giv_all_inlined operator uint32_t () const
 
giv_all_inlined operator int32_t () const
 
 operator signed char () const
 
giv_all_inlined operator uint64_t () const
 
giv_all_inlined operator int64_t () const
 
giv_all_inlined operator std::string () const
 
giv_all_inlined operator float () const
 
giv_all_inlined operator double () const
 
giv_all_inlined operator vect_t () const
 
template<size_t K>
 operator RecInt::ruint< K > () const
 
template<size_t K>
 operator RecInt::rint< K > () const
 
I/O
giv_all_inlined std::ostream & print (std::ostream &o) const
 print32_t integer. More...
 

Static Public Member Functions

static const std::string type_string ()
 
Comparisons functions.
template<class A , class B >
static giv_all_inlined bool isleq (const A &a, const B &b)
 isleq More...
 
Addition, substraction, multiplication
static giv_all_inlined Integeraddin (Integer &res, const Integer &n)
 Addition (inplace) res+=n. More...
 
static giv_all_inlined Integeraddin (Integer &res, const int64_t n)
 Addition (inplace) res+=n. More...
 
static giv_all_inlined Integeraddin (Integer &res, const uint64_t n)
 Addition (inplace) res+=n. More...
 
static giv_all_inlined Integeraddin (Integer &res, const int32_t n)
 Addition (inplace) res+=n. More...
 
static giv_all_inlined Integeraddin (Integer &res, const uint32_t n)
 Addition (inplace) res+=n. More...
 
static giv_all_inlined Integeradd (Integer &res, const Integer &n1, const Integer &n2)
 Addition res=n1+n2. More...
 
static giv_all_inlined Integeradd (Integer &res, const Integer &n1, const int64_t n2)
 Addition (inplace) res+=n. More...
 
static giv_all_inlined Integeradd (Integer &res, const Integer &n1, const uint64_t n2)
 Addition (inplace) res+=n. More...
 
static giv_all_inlined Integeradd (Integer &res, const Integer &n1, const int32_t n2)
 Addition (inplace) res+=n. More...
 
static giv_all_inlined Integeradd (Integer &res, const Integer &n1, const uint32_t n2)
 Addition (inplace) res+=n. More...
 
static giv_all_inlined Integersubin (Integer &res, const Integer &n)
 Substraction (inplace) res-=n. More...
 
static giv_all_inlined Integersubin (Integer &res, const int64_t n)
 Addition (inplace) res+=n. More...
 
static giv_all_inlined Integersubin (Integer &res, const uint64_t n)
 Addition (inplace) res+=n. More...
 
static giv_all_inlined Integersubin (Integer &res, const int32_t n)
 Addition (inplace) res+=n. More...
 
static giv_all_inlined Integersubin (Integer &res, const uint32_t n)
 Addition (inplace) res+=n. More...
 
static giv_all_inlined Integersub (Integer &res, const Integer &n1, const Integer &n2)
 Substraction res=n1-n2. More...
 
static giv_all_inlined Integersub (Integer &res, const Integer &n1, const int64_t n2)
 Addition (inplace) res+=n. More...
 
static giv_all_inlined Integersub (Integer &res, const Integer &n1, const uint64_t n2)
 Addition (inplace) res+=n. More...
 
static giv_all_inlined Integersub (Integer &res, const Integer &n1, const int32_t n2)
 Addition (inplace) res+=n. More...
 
static giv_all_inlined Integersub (Integer &res, const Integer &n1, const uint32_t n2)
 Addition (inplace) res+=n. More...
 
static giv_all_inlined Integernegin (Integer &res)
 Negation (inplace) res=-res. More...
 
static giv_all_inlined Integerneg (Integer &res, const Integer &n)
 Negation res=-n. More...
 
static giv_all_inlined Integermulin (Integer &res, const Integer &n)
 Multiplication (inplace) res*=n. More...
 
static giv_all_inlined Integermulin (Integer &res, const int64_t n)
 Addition (inplace) res+=n. More...
 
static giv_all_inlined Integermulin (Integer &res, const uint64_t n)
 Addition (inplace) res+=n. More...
 
static giv_all_inlined Integermulin (Integer &res, const int32_t n)
 Addition (inplace) res+=n. More...
 
static giv_all_inlined Integermulin (Integer &res, const uint32_t n)
 Addition (inplace) res+=n. More...
 
static giv_all_inlined Integermul (Integer &res, const Integer &n1, const Integer &n2)
 Multiplication res=n1*n2. More...
 
static giv_all_inlined Integermul (Integer &res, const Integer &n1, const int64_t n2)
 Addition (inplace) res+=n. More...
 
static giv_all_inlined Integermul (Integer &res, const Integer &n1, const uint64_t n2)
 Addition (inplace) res+=n. More...
 
static giv_all_inlined Integermul (Integer &res, const Integer &n1, const int32_t n2)
 Addition (inplace) res+=n. More...
 
static giv_all_inlined Integermul (Integer &res, const Integer &n1, const uint32_t n2)
 Addition (inplace) res+=n. More...
 
fused add-multiply

Groups a multiplication and an addition/division in a single function.

This is usually faster than doing the two operations separately (and preferable to using operators).

static giv_all_inlined Integeraxpy (Integer &res, const Integer &a, const Integer &x, const Integer &y)
 axpy res = ax+y. More...
 
static giv_all_inlined Integeraxpy (Integer &res, const Integer &a, const uint64_t x, const Integer &y)
 axpy res = ax+y. More...
 
static giv_all_inlined Integeraxpyin (Integer &res, const Integer &a, const Integer &x)
 axpyin (inplace) res += ax. More...
 
static giv_all_inlined Integeraxpyin (Integer &res, const Integer &a, const uint64_t x)
 axpy res = ax+y. More...
 
static giv_all_inlined Integermaxpy (Integer &res, const Integer &a, const Integer &x, const Integer &y)
 maxpy res = y - ax. More...
 
static giv_all_inlined Integermaxpy (Integer &res, const Integer &a, const uint64_t x, const Integer &y)
 axpy res = ax+y. More...
 
static giv_all_inlined Integermaxpyin (Integer &res, const Integer &a, const Integer &x)
 maxpyin res -= ax. More...
 
static giv_all_inlined Integermaxpyin (Integer &res, const Integer &a, const uint64_t x)
 axpy res = ax+y. More...
 
static giv_all_inlined Integeraxmy (Integer &res, const Integer &a, const Integer &x, const Integer &y)
 axmy res = ax - y. More...
 
static giv_all_inlined Integeraxmy (Integer &res, const Integer &a, const uint64_t x, const Integer &y)
 axpy res = ax+y. More...
 
static giv_all_inlined Integeraxmyin (Integer &res, const Integer &a, const Integer &x)
 axmyin (in place) res = ax - res. More...
 
static giv_all_inlined Integeraxmyin (Integer &res, const Integer &a, const uint64_t x)
 axpy res = ax+y. More...
 
Random numbers functions

Other stuff gmp has (temporary)

static void seeding (uint64_t s)
 Random numbers (no doc) More...
 
static void seeding (const Integer &s)
 Random numbers (no doc) More...
 
static void seeding ()
 Random numbers (no doc) More...
 
static bool RandBool ()
 Random numbers (no doc) More...
 
template<bool ALWAYSPOSITIVE>
static Integerrandom_lessthan (Integer &r, const Integer &m)
 returns a random integer r in the intervall [[x, m-1]] where x = 0 or -(m-1) according to ALWAYSPOSITIVE More...
 
static Integerrandom_lessthan (Integer &r, const Integer &m)
 Random numbers (no doc) More...
 
template<bool ALWAYSPOSITIVE>
static Integerrandom_lessthan (Integer &r, const uint64_t &m)
 Random numbers (no doc) More...
 
static Integerrandom_lessthan (Integer &r, const uint64_t &m)
 Random numbers (no doc) More...
 
template<bool ALWAYSPOSITIVE, class T >
static Integer random_lessthan (const T &m)
 Random numbers (no doc) More...
 
template<class T >
static Integer random_lessthan (const T &m)
 Random numbers (no doc) More...
 
template<bool ALWAYSPOSITIVE>
static Integerrandom_lessthan_2exp (Integer &r, const uint64_t &m)
 returns a random integer r in the intervall [[x, 2^m-1]] where x = 0 or -(2^m-1) according to ALWAYSPOSITIVE returns a random integer r of at most m bits More...
 
static Integerrandom_lessthan_2exp (Integer &r, const uint64_t &m)
 Random numbers (no doc) More...
 
template<bool ALWAYSPOSITIVE>
static Integer random_lessthan_2exp (const uint64_t &m)
 Random numbers (no doc) More...
 
static Integer random_lessthan_2exp (const uint64_t &m)
 Random numbers (no doc) More...
 
template<bool ALWAYSPOSITIVE>
static Integerrandom_exact_2exp (Integer &r, const uint64_t &m)
 returns a reference to a random number r of the size m bits, exactly. More...
 
static Integerrandom_exact_2exp (Integer &r, const uint64_t &m)
 Random numbers (no doc) More...
 
template<bool ALWAYSPOSITIVE>
static Integerrandom_exact (Integer &r, const Integer &s)
 returns a reference to a random number r of the size of s, exactly. More...
 
static Integerrandom_exact (Integer &r, const Integer &s)
 Random numbers (no doc) More...
 
template<bool ALWAYSPOSITIVE>
static Integerrandom_exact (Integer &r, const uint64_t &m)
 Random numbers (no doc) More...
 
static Integerrandom_exact (Integer &r, const uint64_t &m)
 Random numbers (no doc) More...
 
template<bool ALWAYSPOSITIVE, class T >
static Integerrandom_exact (Integer &r, const T &m)
 Random numbers (no doc) More...
 
template<class T >
static Integerrandom_exact (Integer &r, const T &m)
 Random numbers (no doc) More...
 
template<bool ALWAYSPOSITIVE, class T >
static Integer random_exact (const T &s)
 Random numbers (no doc) More...
 
template<class T >
static Integer random_exact (const T &s)
 Random numbers (no doc) More...
 
static Integerrandom_between (Integer &r, const Integer &m, const Integer &M)
 Random numbers (no doc) More...
 
static Integer random_between (const Integer &m, const Integer &M)
 Random numbers (no doc) More...
 
static Integerrandom_between (Integer &r, const uint64_t &m, const uint64_t &M)
 Random numbers (no doc) More...
 
static Integer random_between (const uint64_t &m, const uint64_t &M)
 Random numbers (no doc) More...
 
template<class R >
static Integer random_between (const R &m, const R &M)
 Random numbers (no doc) More...
 
template<class R >
static Integerrandom_between (Integer &r, const R &m, const R &M)
 Random numbers (no doc) More...
 
static Integerrandom_between_2exp (Integer &r, const uint64_t &m, const uint64_t &M)
 Random numbers (no doc) More...
 
static Integer random_between_2exp (const uint64_t &m, const uint64_t &M)
 Random numbers (no doc) More...
 
template<bool ALWAYSPOSITIVE, class T >
static Integerrandom (Integer &r, const T &m)
 returns a random integer less than... More...
 
template<class T >
static Integerrandom (Integer &r, const T &m)
 Random numbers (no doc) More...
 
template<bool ALWAYSPOSITIVE, class T >
static Integer random (const T &sz)
 returns a random integer less than... More...
 
template<class T >
static Integer random (const T &sz)
 Random numbers (no doc) More...
 
template<bool ALWAYSPOSITIVE>
static Integer random ()
 Random numbers (no doc) More...
 
static Integer random ()
 Random numbers (no doc) More...
 
template<bool ALWAYSPOSITIVE, class T >
static Integer nonzerorandom (const T &sz)
 Random numbers (no doc) More...
 
template<bool ALWAYSPOSITIVE, class T >
static Integernonzerorandom (Integer &r, const T &size)
 Random numbers (no doc) More...
 
template<class T >
static Integer nonzerorandom (const T &sz)
 Random numbers (no doc) More...
 
template<class T >
static Integernonzerorandom (Integer &r, const T &size)
 Random numbers (no doc) More...
 
static Integer nonzerorandom ()
 Random numbers (no doc) More...
 

Static Public Attributes

static const Integer zero
 zero (0) More...
 
static const Integer one
 one (1) More...
 
static const Integer mOne
 minus one (-1) More...
 

Protected Types

typedef __mpz_struct Rep
 

Protected Member Functions

const Repget_rep () const
 

Protected Attributes

Rep gmp_rep
 

Friends

struct SpyInteger
 

Division/euclidean division/modulo

The convention for rounding are the following :

  • q = a/b, or equivalent operations with the name div or divin, return q rounded towards 0, in the same manner as C's '/' (truncated division).
  • r = a % b behaves like C %. The modulo function % rounds towards 0 and the sign of the dividend is preserved. This is :

    \[ a= b q + r, \text{with } \vert r\vert < \vert b\vert \text{ and } a r \geq 0 \]

  • r = a mod b or similar functions have the same behaviour as GMP mpz_mod, that is the remainder is always positive (>=0). This is the division algorithm convention that is used (see divmod). In a formula :

    \[ a= b q + r, \text{with } 0 \leq r < \vert b\vert \]

Warning
if q=a/b and r= a % b then a = b q + r is always true (with in addition 0 <= |r| < |b|). This is also true for divmod(q,a,b,r) (and 0<=r<|b|). However, one should not mix the two conventions and expect equalities (except if a>=0).
static giv_all_inlined Integerdivin (Integer &q, const Integer &d)
 Division q/=d. More...
 
static giv_all_inlined Integerdivin (Integer &q, const int64_t d)
 Division q/=d. More...
 
static giv_all_inlined Integerdivin (Integer &q, const uint64_t d)
 Division q/=d. More...
 
static giv_all_inlined Integerdiv (Integer &q, const Integer &n, const Integer &d)
 Division q=n/d. More...
 
static giv_all_inlined Integerdiv (Integer &q, const Integer &n, const int64_t d)
 Division q/=d. More...
 
static giv_all_inlined Integerdiv (Integer &q, const Integer &n, const int32_t d)
 Division q/=d. More...
 
static giv_all_inlined Integerdiv (Integer &q, const Integer &n, const uint64_t d)
 Division q/=d. More...
 
static giv_all_inlined Integerdivexact (Integer &q, const Integer &n, const Integer &d)
 Division when d divides n. More...
 
static giv_all_inlined Integerdivexact (Integer &q, const Integer &n, const uint64_t &d)
 Division q/=d. More...
 
static giv_all_inlined Integerdivexact (Integer &q, const Integer &n, const int64_t &d)
 Division q/=d. More...
 
static giv_all_inlined Integer divexact (const Integer &n, const Integer &d)
 Division when d divides n. More...
 
static giv_all_inlined Integer divexact (const Integer &n, const uint64_t &d)
 Division q/=d. More...
 
static giv_all_inlined Integer divexact (const Integer &n, const int64_t &d)
 Division q/=d. More...
 
static giv_all_inlined Integertrem (Integer &r, const Integer &n, const Integer &d)
 Stuff. More...
 
static giv_all_inlined Integertrem (Integer &r, const Integer &n, const uint64_t &d)
 Stuff. More...
 
static giv_all_inlined uint64_t trem (const Integer &n, const uint64_t &d)
 Stuff. More...
 
static giv_all_inlined Integercrem (Integer &r, const Integer &n, const Integer &d)
 Division q/=d. More...
 
static giv_all_inlined Integercrem (Integer &r, const Integer &n, const uint64_t &d)
 Division q/=d. More...
 
static giv_all_inlined uint64_t crem (const Integer &n, const uint64_t &d)
 Division q/=d. More...
 
static giv_all_inlined Integerfrem (Integer &r, const Integer &n, const Integer &d)
 Division q/=d. More...
 
static giv_all_inlined Integerfrem (Integer &r, const Integer &n, const uint64_t &d)
 Division q/=d. More...
 
static giv_all_inlined uint64_t frem (const Integer &n, const uint64_t &d)
 Division q/=d. More...
 
static giv_all_inlined Integermodin (Integer &r, const Integer &n)
 Function mod (inplace). More...
 
static giv_all_inlined Integermodin (Integer &r, const int64_t n)
 Division q/=d. More...
 
static giv_all_inlined Integermodin (Integer &r, const uint64_t n)
 Division q/=d. More...
 
static giv_all_inlined Integermod (Integer &r, const Integer &n, const Integer &d)
 Function mod. More...
 
static giv_all_inlined Integermod (Integer &r, const Integer &n, const int64_t d)
 Division q/=d. More...
 
static giv_all_inlined Integermod (Integer &r, const Integer &n, const uint64_t d)
 Division q/=d. More...
 
static giv_all_inlined Integermod (Integer &r, const Integer &n, const int32_t d)
 Division q/=d. More...
 
static giv_all_inlined Integermod (Integer &r, const Integer &n, const uint32_t d)
 Division q/=d. More...
 
static giv_all_inlined Integerdivmod (Integer &q, Integer &r, const Integer &n, const Integer &d)
 Euclidean division. More...
 
static giv_all_inlined Integerdivmod (Integer &q, int64_t &r, const Integer &n, const int64_t d)
 Division q/=d. More...
 
static giv_all_inlined Integerdivmod (Integer &q, uint64_t &r, const Integer &n, const uint64_t d)
 Division q/=d. More...
 
static giv_all_inlined Integerceil (Integer &res, const Integer &n, const Integer &d)
 rounding functions. More...
 
static giv_all_inlined Integer ceil (const Integer &n, const Integer &d)
 rounding functions. More...
 
static giv_all_inlined Integerfloor (Integer &res, const Integer &n, const Integer &d)
 
static giv_all_inlined Integer floor (const Integer &n, const Integer &d)
 
static giv_all_inlined Integertrunc (Integer &res, const Integer &n, const Integer &d)
 
static giv_all_inlined Integer trunc (const Integer &n, const Integer &d)
 
giv_all_inlined Integer operator/ (const Integer &d) const
 Division operator. More...
 
giv_all_inlined Integer operator/ (const uint64_t d) const
 Division q/=d. More...
 
giv_all_inlined Integer operator/ (const int64_t d) const
 Division q/=d. More...
 
giv_all_inlined Integer operator/ (const uint32_t d) const
 Division q/=d. More...
 
giv_all_inlined Integer operator/ (const int32_t d) const
 Division q/=d. More...
 
giv_all_inlined Integeroperator/= (const Integer &d)
 Division operator (inplace). More...
 
giv_all_inlined Integeroperator/= (const uint64_t d)
 Division q/=d. More...
 
giv_all_inlined Integeroperator/= (const int64_t d)
 Division q/=d. More...
 
giv_all_inlined Integeroperator/= (const uint32_t d)
 Division q/=d. More...
 
giv_all_inlined Integeroperator/= (const int32_t d)
 Division q/=d. More...
 
template<class XXX >
Integeroperator/= (const XXX &d)
 Division q/=d. More...
 
giv_all_inlined Integer operator% (const Integer &n) const
 Modulo operator. More...
 
giv_all_inlined int64_t operator% (const uint64_t n) const
 Division q/=d. More...
 
giv_all_inlined int64_t operator% (const int64_t n) const
 Division q/=d. More...
 
giv_all_inlined int32_t operator% (const uint32_t n) const
 Division q/=d. More...
 
giv_all_inlined int32_t operator% (const int32_t n) const
 Division q/=d. More...
 
giv_all_inlined double operator% (const double n) const
 Division q/=d. More...
 
int16_t operator% (const uint16_t n) const
 Division q/=d. More...
 
template<class XXX >
XXX operator% (const XXX &n) const
 Division q/=d. More...
 
giv_all_inlined Integeroperator%= (const Integer &n)
 Modulo operator (inplace). More...
 
giv_all_inlined Integeroperator%= (const uint64_t n)
 Division q/=d. More...
 
giv_all_inlined Integeroperator%= (const int64_t n)
 Division q/=d. More...
 
giv_all_inlined Integeroperator%= (const uint32_t n)
 Division q/=d. More...
 
giv_all_inlined Integeroperator%= (const int32_t n)
 Division q/=d. More...
 
template<class XXX >
Integeroperator%= (const XXX &n)
 Division q/=d. More...
 

Member Typedef Documentation

◆ vect_t

typedef std::vector<mp_limb_t> vect_t
inherited

vector of limbs (ie a gmp number).

◆ Rep

typedef __mpz_struct Rep
protectedinherited

rep type

Member Function Documentation

◆ type_string()

static const std::string type_string ( )
inlinestaticinherited

◆ logcpy()

Integer & logcpy ( const Integer n)
inherited

copy from an integer.

Parameters
ninteger to copy.

◆ copy()

Integer & copy ( const Integer n)
inherited

copy from an integer.

Parameters
ninteger to copy.

◆ isleq()

static giv_all_inlined bool isleq ( const A &  a,
const B &  b 
)
inlinestaticinherited

isleq

Parameters
a,b

◆ operator>=() [1/7]

int32_t operator>= ( const Integer l) const
inherited

greater or equal.

Parameters
linteger to be compared to

◆ operator>=() [2/7]

int32_t operator>= ( const int32_t  l) const
inherited

greater or equal.

Parameters
linteger to be compared to

◆ operator>=() [3/7]

int32_t operator>= ( const int64_t  l) const
inherited

greater or equal.

Parameters
linteger to be compared to

◆ operator>=() [4/7]

int32_t operator>= ( const uint64_t  l) const
inherited

greater or equal.

Parameters
linteger to be compared to

◆ operator>=() [5/7]

int32_t operator>= ( const uint32_t  l) const
inherited

greater or equal.

Parameters
linteger to be compared to

◆ operator>=() [6/7]

int32_t operator>= ( const double  l) const
inherited

greater or equal.

Parameters
linteger to be compared to

◆ operator>=() [7/7]

int32_t operator>= ( const float  l) const
inherited

greater or equal.

Parameters
linteger to be compared to

◆ operator<=() [1/7]

int32_t operator<= ( const Integer l) const
inherited

less or equal

Parameters
linteger to be compared to

◆ operator<=() [2/7]

int32_t operator<= ( const int32_t  l) const
inherited

greater or equal.

Parameters
linteger to be compared to

◆ operator<=() [3/7]

int32_t operator<= ( const int64_t  l) const
inherited

greater or equal.

Parameters
linteger to be compared to

◆ operator<=() [4/7]

int32_t operator<= ( const uint64_t  l) const
inherited

greater or equal.

Parameters
linteger to be compared to

◆ operator<=() [5/7]

int32_t operator<= ( const uint32_t  l) const
inherited

greater or equal.

Parameters
linteger to be compared to

◆ operator<=() [6/7]

int32_t operator<= ( const double  l) const
inherited

greater or equal.

Parameters
linteger to be compared to

◆ operator<=() [7/7]

int32_t operator<= ( const float  l) const
inherited

greater or equal.

Parameters
linteger to be compared to

◆ operator!=() [1/7]

int32_t operator!= ( const Integer l) const
inherited

operator != (not equal)

Parameters
linteger
Returns
1 iff l == this

◆ operator!=() [2/7]

int32_t operator!= ( const int32_t  l) const
inherited

greater or equal.

Parameters
linteger to be compared to

◆ operator!=() [3/7]

int32_t operator!= ( const int64_t  l) const
inherited

greater or equal.

Parameters
linteger to be compared to

◆ operator!=() [4/7]

int32_t operator!= ( const uint64_t  l) const
inherited

greater or equal.

Parameters
linteger to be compared to

◆ operator!=() [5/7]

int32_t operator!= ( const uint32_t  l) const
inherited

greater or equal.

Parameters
linteger to be compared to

◆ operator!=() [6/7]

int32_t operator!= ( const double  l) const
inherited

greater or equal.

Parameters
linteger to be compared to

◆ operator!=() [7/7]

int32_t operator!= ( const float  l) const
inherited

greater or equal.

Parameters
linteger to be compared to

◆ operator==() [1/7]

int32_t operator== ( const Integer l) const
inherited

Equality.

Parameters
linteger to be compared to

◆ operator==() [2/7]

int32_t operator== ( const int32_t  l) const
inherited

greater or equal.

Parameters
linteger to be compared to

◆ operator==() [3/7]

int32_t operator== ( const int64_t  l) const
inherited

greater or equal.

Parameters
linteger to be compared to

◆ operator==() [4/7]

int32_t operator== ( const uint64_t  l) const
inherited

greater or equal.

Parameters
linteger to be compared to

◆ operator==() [5/7]

int32_t operator== ( const uint32_t  l) const
inherited

greater or equal.

Parameters
linteger to be compared to

◆ operator==() [6/7]

int32_t operator== ( const double  l) const
inherited

greater or equal.

Parameters
linteger to be compared to

◆ operator==() [7/7]

int32_t operator== ( const float  l) const
inherited

greater or equal.

Parameters
linteger to be compared to

◆ operator>() [1/7]

int32_t operator> ( const Integer l) const
inherited

greater (strict)

Parameters
linteger to be compared to

◆ operator>() [2/7]

int32_t operator> ( const int32_t  l) const
inherited

greater or equal.

Parameters
linteger to be compared to

◆ operator>() [3/7]

int32_t operator> ( const int64_t  l) const
inherited

greater or equal.

Parameters
linteger to be compared to

◆ operator>() [4/7]

int32_t operator> ( const uint64_t  l) const
inherited

greater or equal.

Parameters
linteger to be compared to

◆ operator>() [5/7]

int32_t operator> ( const uint32_t  l) const
inherited

greater or equal.

Parameters
linteger to be compared to

◆ operator>() [6/7]

int32_t operator> ( const double  l) const
inherited

greater or equal.

Parameters
linteger to be compared to

◆ operator>() [7/7]

int32_t operator> ( const float  l) const
inherited

greater or equal.

Parameters
linteger to be compared to

◆ operator<() [1/7]

int32_t operator< ( const Integer l) const
inherited

less (strict)

Parameters
linteger to be compared to

◆ operator<() [2/7]

int32_t operator< ( const int32_t  l) const
inherited

greater or equal.

Parameters
linteger to be compared to

◆ operator<() [3/7]

int32_t operator< ( const int64_t  l) const
inherited

greater or equal.

Parameters
linteger to be compared to

◆ operator<() [4/7]

int32_t operator< ( const uint64_t  l) const
inherited

greater or equal.

Parameters
linteger to be compared to

◆ operator<() [5/7]

int32_t operator< ( const uint32_t  l) const
inherited

greater or equal.

Parameters
linteger to be compared to

◆ operator<() [6/7]

int32_t operator< ( const double  l) const
inherited

greater or equal.

Parameters
linteger to be compared to

◆ operator<() [7/7]

int32_t operator< ( const float  l) const
inherited

greater or equal.

Parameters
linteger to be compared to

◆ operator^() [1/3]

Integer operator^ ( const Integer a) const
inherited

XOR (^)

Parameters
ainteger

◆ operator^() [2/3]

Integer operator^ ( const uint64_t &  a) const
inherited

XOR (^)

Parameters
ainteger

◆ operator^() [3/3]

Integer operator^ ( const uint32_t &  a) const
inherited

XOR (^)

Parameters
ainteger

◆ operator^=() [1/3]

Integer & operator^= ( const Integer a)
inherited

XOR inplace (^=)

Parameters
ainteger

◆ operator^=() [2/3]

Integer & operator^= ( const uint64_t &  a)
inherited

XOR (^)

Parameters
ainteger

◆ operator^=() [3/3]

Integer & operator^= ( const uint32_t &  a)
inherited

XOR (^)

Parameters
ainteger

◆ operator|() [1/3]

Integer operator| ( const Integer a) const
inherited

OR (|)

Parameters
ainteger

◆ operator|() [2/3]

Integer operator| ( const uint64_t &  a) const
inherited

XOR (^)

Parameters
ainteger

◆ operator|() [3/3]

Integer operator| ( const uint32_t &  a) const
inherited

XOR (^)

Parameters
ainteger

◆ operator|=() [1/3]

Integer & operator|= ( const Integer a)
inherited

OR inplace (|=)

Parameters
ainteger

◆ operator|=() [2/3]

Integer & operator|= ( const uint64_t &  a)
inherited

XOR (^)

Parameters
ainteger

◆ operator|=() [3/3]

Integer & operator|= ( const uint32_t &  a)
inherited

XOR (^)

Parameters
ainteger

◆ operator&() [1/3]

Integer operator& ( const Integer a) const
inherited

AND (&)

Parameters
ainteger

◆ operator&() [2/3]

uint32_t operator& ( const uint32_t &  a) const
inherited

XOR (^)

Parameters
ainteger

◆ operator&() [3/3]

uint64_t operator& ( const uint64_t &  a) const
inherited

XOR (^)

Parameters
ainteger

◆ operator&=() [1/3]

Integer & operator&= ( const Integer a)
inherited

AND inplace (&=)

Parameters
ainteger

◆ operator&=() [2/3]

Integer & operator&= ( const uint64_t &  a)
inherited

XOR (^)

Parameters
ainteger

◆ operator&=() [3/3]

Integer & operator&= ( const uint32_t &  a)
inherited

XOR (^)

Parameters
ainteger

◆ operator~()

Integer operator~ ( ) const
inherited

complement to 1 (~)

◆ operator<<() [1/4]

Integer operator<< ( int32_t  l) const
inherited

left shift (<<)

Parameters
lshift

◆ operator<<() [2/4]

Integer operator<< ( int64_t  l) const
inherited

XOR (^)

Parameters
ainteger

◆ operator<<() [3/4]

Integer operator<< ( uint32_t  l) const
inherited

XOR (^)

Parameters
ainteger

◆ operator<<() [4/4]

Integer operator<< ( uint64_t  l) const
inherited

XOR (^)

Parameters
ainteger

◆ operator<<=() [1/4]

Integer & operator<<= ( int32_t  l)
inherited

left shift inplace (<<=)

Parameters
lshift

◆ operator<<=() [2/4]

Integer & operator<<= ( int64_t  l)
inherited

XOR (^)

Parameters
ainteger

◆ operator<<=() [3/4]

Integer & operator<<= ( uint32_t  l)
inherited

XOR (^)

Parameters
ainteger

◆ operator<<=() [4/4]

Integer & operator<<= ( uint64_t  l)
inherited

XOR (^)

Parameters
ainteger

◆ operator>>() [1/4]

Integer operator>> ( int32_t  l) const
inherited

right shift (>>)

Parameters
lshift

◆ operator>>() [2/4]

Integer operator>> ( int64_t  l) const
inherited

XOR (^)

Parameters
ainteger

◆ operator>>() [3/4]

Integer operator>> ( uint32_t  l) const
inherited

XOR (^)

Parameters
ainteger

◆ operator>>() [4/4]

Integer operator>> ( uint64_t  l) const
inherited

XOR (^)

Parameters
ainteger

◆ operator>>=() [1/4]

Integer & operator>>= ( int32_t  l)
inherited

right shift inplace (>>=)

Parameters
lshift

◆ operator>>=() [2/4]

Integer & operator>>= ( int64_t  l)
inherited

XOR (^)

Parameters
ainteger

◆ operator>>=() [3/4]

Integer & operator>>= ( uint32_t  l)
inherited

XOR (^)

Parameters
ainteger

◆ operator>>=() [4/4]

Integer & operator>>= ( uint64_t  l)
inherited

XOR (^)

Parameters
ainteger

◆ addin() [1/5]

Integer & addin ( Integer res,
const Integer n 
)
staticinherited

Addition (inplace) res+=n.

Parameters
resas in the formula
nas in the formula

◆ addin() [2/5]

Integer & addin ( Integer res,
const int64_t  n 
)
staticinherited

Addition (inplace) res+=n.

Parameters
resas in the formula
nas in the formula

◆ addin() [3/5]

Integer & addin ( Integer res,
const uint64_t  n 
)
staticinherited

Addition (inplace) res+=n.

Parameters
resas in the formula
nas in the formula

◆ addin() [4/5]

static giv_all_inlined Integer& addin ( Integer res,
const int32_t  n 
)
inlinestaticinherited

Addition (inplace) res+=n.

Parameters
resas in the formula
nas in the formula

◆ addin() [5/5]

static giv_all_inlined Integer& addin ( Integer res,
const uint32_t  n 
)
inlinestaticinherited

Addition (inplace) res+=n.

Parameters
resas in the formula
nas in the formula

◆ add() [1/5]

Integer & add ( Integer res,
const Integer n1,
const Integer n2 
)
staticinherited

Addition res=n1+n2.

Parameters
resas in the formula
n1as in the formula
n2as in the formula

◆ add() [2/5]

Integer & add ( Integer res,
const Integer n1,
const int64_t  n2 
)
staticinherited

Addition (inplace) res+=n.

Parameters
resas in the formula
nas in the formula

◆ add() [3/5]

Integer & add ( Integer res,
const Integer n1,
const uint64_t  n2 
)
staticinherited

Addition (inplace) res+=n.

Parameters
resas in the formula
nas in the formula

◆ add() [4/5]

static giv_all_inlined Integer& add ( Integer res,
const Integer n1,
const int32_t  n2 
)
inlinestaticinherited

Addition (inplace) res+=n.

Parameters
resas in the formula
nas in the formula

◆ add() [5/5]

static giv_all_inlined Integer& add ( Integer res,
const Integer n1,
const uint32_t  n2 
)
inlinestaticinherited

Addition (inplace) res+=n.

Parameters
resas in the formula
nas in the formula

◆ subin() [1/5]

Integer & subin ( Integer res,
const Integer n 
)
staticinherited

Substraction (inplace) res-=n.

Parameters
resas in the formula
nas in the formula

◆ subin() [2/5]

Integer & subin ( Integer res,
const int64_t  n 
)
staticinherited

Addition (inplace) res+=n.

Parameters
resas in the formula
nas in the formula

◆ subin() [3/5]

Integer & subin ( Integer res,
const uint64_t  n 
)
staticinherited

Addition (inplace) res+=n.

Parameters
resas in the formula
nas in the formula

◆ subin() [4/5]

static giv_all_inlined Integer& subin ( Integer res,
const int32_t  n 
)
inlinestaticinherited

Addition (inplace) res+=n.

Parameters
resas in the formula
nas in the formula

◆ subin() [5/5]

static giv_all_inlined Integer& subin ( Integer res,
const uint32_t  n 
)
inlinestaticinherited

Addition (inplace) res+=n.

Parameters
resas in the formula
nas in the formula

◆ sub() [1/5]

Integer & sub ( Integer res,
const Integer n1,
const Integer n2 
)
staticinherited

Substraction res=n1-n2.

Parameters
resas in the formula
n1as in the formula
n2as in the formula
Examples
examples/Integer/Fibonacci.C.

◆ sub() [2/5]

Integer & sub ( Integer res,
const Integer n1,
const int64_t  n2 
)
staticinherited

Addition (inplace) res+=n.

Parameters
resas in the formula
nas in the formula

◆ sub() [3/5]

Integer & sub ( Integer res,
const Integer n1,
const uint64_t  n2 
)
staticinherited

Addition (inplace) res+=n.

Parameters
resas in the formula
nas in the formula

◆ sub() [4/5]

static giv_all_inlined Integer& sub ( Integer res,
const Integer n1,
const int32_t  n2 
)
inlinestaticinherited

Addition (inplace) res+=n.

Parameters
resas in the formula
nas in the formula

◆ sub() [5/5]

static giv_all_inlined Integer& sub ( Integer res,
const Integer n1,
const uint32_t  n2 
)
inlinestaticinherited

Addition (inplace) res+=n.

Parameters
resas in the formula
nas in the formula

◆ negin()

Integer & negin ( Integer res)
staticinherited

Negation (inplace) res=-res.

Parameters
resas in the formula

◆ neg()

Integer & neg ( Integer res,
const Integer n 
)
staticinherited

Negation res=-n.

Parameters
nas in the formula
resas in the formula

◆ mulin() [1/5]

Integer & mulin ( Integer res,
const Integer n 
)
staticinherited

Multiplication (inplace) res*=n.

Parameters
resas in the formula
nas in the formula

◆ mulin() [2/5]

Integer & mulin ( Integer res,
const int64_t  n 
)
staticinherited

Addition (inplace) res+=n.

Parameters
resas in the formula
nas in the formula

◆ mulin() [3/5]

Integer & mulin ( Integer res,
const uint64_t  n 
)
staticinherited

Addition (inplace) res+=n.

Parameters
resas in the formula
nas in the formula

◆ mulin() [4/5]

static giv_all_inlined Integer& mulin ( Integer res,
const int32_t  n 
)
inlinestaticinherited

Addition (inplace) res+=n.

Parameters
resas in the formula
nas in the formula

◆ mulin() [5/5]

static giv_all_inlined Integer& mulin ( Integer res,
const uint32_t  n 
)
inlinestaticinherited

Addition (inplace) res+=n.

Parameters
resas in the formula
nas in the formula

◆ mul() [1/5]

Integer & mul ( Integer res,
const Integer n1,
const Integer n2 
)
staticinherited

Multiplication res=n1*n2.

Parameters
resas in the formula
n1as in the formula
n2as in the formula

◆ mul() [2/5]

Integer & mul ( Integer res,
const Integer n1,
const int64_t  n2 
)
staticinherited

Addition (inplace) res+=n.

Parameters
resas in the formula
nas in the formula

◆ mul() [3/5]

Integer & mul ( Integer res,
const Integer n1,
const uint64_t  n2 
)
staticinherited

Addition (inplace) res+=n.

Parameters
resas in the formula
nas in the formula

◆ mul() [4/5]

static giv_all_inlined Integer& mul ( Integer res,
const Integer n1,
const int32_t  n2 
)
inlinestaticinherited

Addition (inplace) res+=n.

Parameters
resas in the formula
nas in the formula

◆ mul() [5/5]

static giv_all_inlined Integer& mul ( Integer res,
const Integer n1,
const uint32_t  n2 
)
inlinestaticinherited

Addition (inplace) res+=n.

Parameters
resas in the formula
nas in the formula

◆ operator+() [1/5]

Integer operator+ ( const Integer n) const
inherited

operator +.

Returns
(*this)+n
Parameters
nas in the formula.

◆ operator+() [2/5]

Integer operator+ ( const uint64_t  n) const
inherited

operator +.

Returns
(*this)+n
Parameters
nas in the formula.

◆ operator+() [3/5]

Integer operator+ ( const int64_t  n) const
inherited

operator +.

Returns
(*this)+n
Parameters
nas in the formula.

◆ operator+() [4/5]

giv_all_inlined Integer operator+ ( const uint32_t  n) const
inlineinherited

operator +.

Returns
(*this)+n
Parameters
nas in the formula.

◆ operator+() [5/5]

giv_all_inlined Integer operator+ ( const int32_t  n) const
inlineinherited

operator +.

Returns
(*this)+n
Parameters
nas in the formula.

◆ operator+=() [1/6]

Integer & operator+= ( const Integer n)
inherited

operator += .

Parameters
nasfriend In the formula.
Returns
(*this) += n.

◆ operator+=() [2/6]

Integer & operator+= ( const uint64_t  n)
inherited

operator +.

Returns
(*this)+n
Parameters
nas in the formula.

◆ operator+=() [3/6]

Integer & operator+= ( const int64_t  n)
inherited

operator +.

Returns
(*this)+n
Parameters
nas in the formula.

◆ operator+=() [4/6]

giv_all_inlined Integer& operator+= ( const uint32_t  n)
inlineinherited

operator +.

Returns
(*this)+n
Parameters
nas in the formula.

◆ operator+=() [5/6]

giv_all_inlined Integer& operator+= ( const int32_t  n)
inlineinherited

operator +.

Returns
(*this)+n
Parameters
nas in the formula.

◆ operator+=() [6/6]

Integer& operator+= ( const XXX &  n)
inlineinherited

operator +.

Returns
(*this)+n
Parameters
nas in the formula.

◆ operator-() [1/6]

Integer operator- ( const Integer n) const
inherited

operator -.

Returns
(*this)-n
Parameters
nas in the formula.

◆ operator-() [2/6]

Integer operator- ( const uint64_t  n) const
inherited

operator +.

Returns
(*this)+n
Parameters
nas in the formula.

◆ operator-() [3/6]

Integer operator- ( const int64_t  n) const
inherited

operator +.

Returns
(*this)+n
Parameters
nas in the formula.

◆ operator-() [4/6]

giv_all_inlined Integer operator- ( const uint32_t  n) const
inlineinherited

operator +.

Returns
(*this)+n
Parameters
nas in the formula.

◆ operator-() [5/6]

giv_all_inlined Integer operator- ( const int32_t  n) const
inlineinherited

operator +.

Returns
(*this)+n
Parameters
nas in the formula.

◆ operator-() [6/6]

Integer operator- ( ) const
inherited

Opposite.

Returns
-(*this).

◆ operator-=() [1/6]

Integer & operator-= ( const Integer n)
inherited

operator -= .

Parameters
nas in the formula.
Returns
(*this) -= n.

◆ operator-=() [2/6]

Integer & operator-= ( const uint64_t  n)
inherited

operator +.

Returns
(*this)+n
Parameters
nas in the formula.

◆ operator-=() [3/6]

Integer & operator-= ( const int64_t  n)
inherited

operator +.

Returns
(*this)+n
Parameters
nas in the formula.

◆ operator-=() [4/6]

giv_all_inlined Integer& operator-= ( const uint32_t  n)
inlineinherited

operator +.

Returns
(*this)+n
Parameters
nas in the formula.

◆ operator-=() [5/6]

giv_all_inlined Integer& operator-= ( const int32_t  n)
inlineinherited

operator +.

Returns
(*this)+n
Parameters
nas in the formula.

◆ operator-=() [6/6]

Integer& operator-= ( const XXX &  n)
inlineinherited

operator +.

Returns
(*this)+n
Parameters
nas in the formula.

◆ operator*() [1/5]

Integer operator* ( const Integer n) const
inherited

operator *.

Returns
(*this)*n
Parameters
nas in the formula.

◆ operator*() [2/5]

Integer operator* ( const uint64_t  n) const
inherited

operator +.

Returns
(*this)+n
Parameters
nas in the formula.

◆ operator*() [3/5]

Integer operator* ( const int64_t  n) const
inherited

operator +.

Returns
(*this)+n
Parameters
nas in the formula.

◆ operator*() [4/5]

giv_all_inlined Integer operator* ( const uint32_t  n) const
inlineinherited

operator +.

Returns
(*this)+n
Parameters
nas in the formula.

◆ operator*() [5/5]

giv_all_inlined Integer operator* ( const int32_t  n) const
inlineinherited

operator +.

Returns
(*this)+n
Parameters
nas in the formula.

◆ operator*=() [1/6]

Integer & operator*= ( const Integer n)
inherited

operator *= .

Parameters
nas in the formula.
Returns
(*this) *= n.

◆ operator*=() [2/6]

Integer & operator*= ( const uint64_t  n)
inherited

operator +.

Returns
(*this)+n
Parameters
nas in the formula.

◆ operator*=() [3/6]

Integer & operator*= ( const int64_t  n)
inherited

operator +.

Returns
(*this)+n
Parameters
nas in the formula.

◆ operator*=() [4/6]

giv_all_inlined Integer& operator*= ( const uint32_t  n)
inlineinherited

operator +.

Returns
(*this)+n
Parameters
nas in the formula.

◆ operator*=() [5/6]

giv_all_inlined Integer& operator*= ( const int32_t  n)
inlineinherited

operator +.

Returns
(*this)+n
Parameters
nas in the formula.

◆ operator*=() [6/6]

Integer& operator*= ( const XXX &  n)
inlineinherited

operator +.

Returns
(*this)+n
Parameters
nas in the formula.

◆ axpy() [1/2]

Integer & axpy ( Integer res,
const Integer a,
const Integer x,
const Integer y 
)
staticinherited

axpy res = ax+y.

Parameters
resIntegers as in the forumla
aIntegers as in the forumla
xIntegers as in the forumla
yIntegers as in the forumla

◆ axpy() [2/2]

Integer & axpy ( Integer res,
const Integer a,
const uint64_t  x,
const Integer y 
)
staticinherited

axpy res = ax+y.

Parameters
resIntegers as in the forumla
aIntegers as in the forumla
xIntegers as in the forumla
yIntegers as in the forumla

◆ axpyin() [1/2]

Integer & axpyin ( Integer res,
const Integer a,
const Integer x 
)
staticinherited

axpyin (inplace) res += ax.

Parameters
resIntegers as in the formula.
aIntegers as in the formula.
xIntegers as in the formula.

◆ axpyin() [2/2]

Integer & axpyin ( Integer res,
const Integer a,
const uint64_t  x 
)
staticinherited

axpy res = ax+y.

Parameters
resIntegers as in the forumla
aIntegers as in the forumla
xIntegers as in the forumla
yIntegers as in the forumla

◆ maxpy() [1/2]

Integer & maxpy ( Integer res,
const Integer a,
const Integer x,
const Integer y 
)
staticinherited

maxpy res = y - ax.

Parameters
resIntegers as in the formula.
aIntegers as in the formula.
xIntegers as in the formula.
yIntegers as in the formula.

◆ maxpy() [2/2]

Integer & maxpy ( Integer res,
const Integer a,
const uint64_t  x,
const Integer y 
)
staticinherited

axpy res = ax+y.

Parameters
resIntegers as in the forumla
aIntegers as in the forumla
xIntegers as in the forumla
yIntegers as in the forumla

◆ maxpyin() [1/2]

Integer & maxpyin ( Integer res,
const Integer a,
const Integer x 
)
staticinherited

maxpyin res -= ax.

Parameters
resIntegers as in the formula.
aIntegers as in the formula.
xIntegers as in the formula.

◆ maxpyin() [2/2]

Integer & maxpyin ( Integer res,
const Integer a,
const uint64_t  x 
)
staticinherited

axpy res = ax+y.

Parameters
resIntegers as in the forumla
aIntegers as in the forumla
xIntegers as in the forumla
yIntegers as in the forumla

◆ axmy() [1/2]

Integer & axmy ( Integer res,
const Integer a,
const Integer x,
const Integer y 
)
staticinherited

axmy res = ax - y.

Parameters
resIntegers as in the formula.
aIntegers as in the formula.
xIntegers as in the formula.
yIntegers as in the formula.

◆ axmy() [2/2]

Integer & axmy ( Integer res,
const Integer a,
const uint64_t  x,
const Integer y 
)
staticinherited

axpy res = ax+y.

Parameters
resIntegers as in the forumla
aIntegers as in the forumla
xIntegers as in the forumla
yIntegers as in the forumla

◆ axmyin() [1/2]

Integer & axmyin ( Integer res,
const Integer a,
const Integer x 
)
staticinherited

axmyin (in place) res = ax - res.

Parameters
resIntegers as in the formula.
aIntegers as in the formula.
xIntegers as in the formula.

◆ axmyin() [2/2]

Integer & axmyin ( Integer res,
const Integer a,
const uint64_t  x 
)
staticinherited

axpy res = ax+y.

Parameters
resIntegers as in the forumla
aIntegers as in the forumla
xIntegers as in the forumla
yIntegers as in the forumla

◆ divin() [1/3]

Integer & divin ( Integer q,
const Integer d 
)
staticinherited

Division q/=d.

Parameters
qquotient
ddivisor.
Returns
q

◆ divin() [2/3]

Integer & divin ( Integer q,
const int64_t  d 
)
staticinherited

Division q/=d.

Parameters
qquotient
ddivisor.
Returns
q

◆ divin() [3/3]

Integer & divin ( Integer q,
const uint64_t  d 
)
staticinherited

Division q/=d.

Parameters
qquotient
ddivisor.
Returns
q

◆ div() [1/4]

Integer & div ( Integer q,
const Integer n,
const Integer d 
)
staticinherited

Division q=n/d.

Parameters
qquotient
ndividand.
ddivisor
Returns
q

◆ div() [2/4]

Integer & div ( Integer q,
const Integer n,
const int64_t  d 
)
staticinherited

Division q/=d.

Parameters
qquotient
ddivisor.
Returns
q

◆ div() [3/4]

Integer & div ( Integer q,
const Integer n,
const int32_t  d 
)
staticinherited

Division q/=d.

Parameters
qquotient
ddivisor.
Returns
q

◆ div() [4/4]

Integer & div ( Integer q,
const Integer n,
const uint64_t  d 
)
staticinherited

Division q/=d.

Parameters
qquotient
ddivisor.
Returns
q

◆ divexact() [1/6]

Integer & divexact ( Integer q,
const Integer n,
const Integer d 
)
staticinherited

Division when d divides n.

Parameters
qexact quotient
ndividend
ddivisor
Warning
if quotient is not exact, the result is not predictable.

◆ divexact() [2/6]

Integer & divexact ( Integer q,
const Integer n,
const uint64_t &  d 
)
staticinherited

Division q/=d.

Parameters
qquotient
ddivisor.
Returns
q

◆ divexact() [3/6]

Integer & divexact ( Integer q,
const Integer n,
const int64_t &  d 
)
staticinherited

Division q/=d.

Parameters
qquotient
ddivisor.
Returns
q

◆ divexact() [4/6]

Integer divexact ( const Integer n,
const Integer d 
)
staticinherited

Division when d divides n.

Parameters
ndividend
ddivisor
Returns
exact quotient n/d
Warning
if quotient is not exact, the result is not predictable.

◆ divexact() [5/6]

Integer divexact ( const Integer n,
const uint64_t &  d 
)
staticinherited

Division q/=d.

Parameters
qquotient
ddivisor.
Returns
q

◆ divexact() [6/6]

Integer divexact ( const Integer n,
const int64_t &  d 
)
staticinherited

Division q/=d.

Parameters
qquotient
ddivisor.
Returns
q

◆ trem() [1/3]

Integer & trem ( Integer r,
const Integer n,
const Integer d 
)
staticinherited

Stuff.

◆ trem() [2/3]

Integer & trem ( Integer r,
const Integer n,
const uint64_t &  d 
)
staticinherited

Stuff.

◆ trem() [3/3]

uint64_t trem ( const Integer n,
const uint64_t &  d 
)
staticinherited

Stuff.

◆ crem() [1/3]

Integer & crem ( Integer r,
const Integer n,
const Integer d 
)
staticinherited

Division q/=d.

Parameters
qquotient
ddivisor.
Returns
q

◆ crem() [2/3]

Integer & crem ( Integer r,
const Integer n,
const uint64_t &  d 
)
staticinherited

Division q/=d.

Parameters
qquotient
ddivisor.
Returns
q

◆ crem() [3/3]

uint64_t crem ( const Integer n,
const uint64_t &  d 
)
staticinherited

Division q/=d.

Parameters
qquotient
ddivisor.
Returns
q

◆ frem() [1/3]

Integer & frem ( Integer r,
const Integer n,
const Integer d 
)
staticinherited

Division q/=d.

Parameters
qquotient
ddivisor.
Returns
q

◆ frem() [2/3]

Integer & frem ( Integer r,
const Integer n,
const uint64_t &  d 
)
staticinherited

Division q/=d.

Parameters
qquotient
ddivisor.
Returns
q

◆ frem() [3/3]

uint64_t frem ( const Integer n,
const uint64_t &  d 
)
staticinherited

Division q/=d.

Parameters
qquotient
ddivisor.
Returns
q

◆ operator/() [1/5]

Integer operator/ ( const Integer d) const
inherited

Division operator.

Parameters
ddivisor

◆ operator/() [2/5]

Integer operator/ ( const uint64_t  d) const
inherited

Division q/=d.

Parameters
qquotient
ddivisor.
Returns
q

◆ operator/() [3/5]

Integer operator/ ( const int64_t  d) const
inherited

Division q/=d.

Parameters
qquotient
ddivisor.
Returns
q

◆ operator/() [4/5]

giv_all_inlined Integer operator/ ( const uint32_t  d) const
inlineinherited

Division q/=d.

Parameters
qquotient
ddivisor.
Returns
q

◆ operator/() [5/5]

giv_all_inlined Integer operator/ ( const int32_t  d) const
inlineinherited

Division q/=d.

Parameters
qquotient
ddivisor.
Returns
q

◆ operator/=() [1/6]

Integer & operator/= ( const Integer d)
inherited

Division operator (inplace).

Parameters
ddivisor

◆ operator/=() [2/6]

Integer & operator/= ( const uint64_t  d)
inherited

Division q/=d.

Parameters
qquotient
ddivisor.
Returns
q

◆ operator/=() [3/6]

Integer & operator/= ( const int64_t  d)
inherited

Division q/=d.

Parameters
qquotient
ddivisor.
Returns
q

◆ operator/=() [4/6]

giv_all_inlined Integer& operator/= ( const uint32_t  d)
inlineinherited

Division q/=d.

Parameters
qquotient
ddivisor.
Returns
q

◆ operator/=() [5/6]

giv_all_inlined Integer& operator/= ( const int32_t  d)
inlineinherited

Division q/=d.

Parameters
qquotient
ddivisor.
Returns
q

◆ operator/=() [6/6]

Integer& operator/= ( const XXX &  d)
inlineinherited

Division q/=d.

Parameters
qquotient
ddivisor.
Returns
q

◆ modin() [1/3]

Integer & modin ( Integer r,
const Integer n 
)
staticinherited

Function mod (inplace).

$ r \gets r \mod n$

Parameters
rremainder
nmodulus

◆ modin() [2/3]

Integer & modin ( Integer r,
const int64_t  n 
)
staticinherited

Division q/=d.

Parameters
qquotient
ddivisor.
Returns
q

◆ modin() [3/3]

Integer & modin ( Integer r,
const uint64_t  n 
)
staticinherited

Division q/=d.

Parameters
qquotient
ddivisor.
Returns
q

◆ mod() [1/5]

Integer & mod ( Integer r,
const Integer n,
const Integer d 
)
staticinherited

Function mod.

$ r \gets n \mod d$

Parameters
rremainder
ninteger
dmodulus

◆ mod() [2/5]

Integer & mod ( Integer r,
const Integer n,
const int64_t  d 
)
staticinherited

Division q/=d.

Parameters
qquotient
ddivisor.
Returns
q

◆ mod() [3/5]

Integer & mod ( Integer r,
const Integer n,
const uint64_t  d 
)
staticinherited

Division q/=d.

Parameters
qquotient
ddivisor.
Returns
q

◆ mod() [4/5]

static giv_all_inlined Integer& mod ( Integer r,
const Integer n,
const int32_t  d 
)
inlinestaticinherited

Division q/=d.

Parameters
qquotient
ddivisor.
Returns
q

◆ mod() [5/5]

static giv_all_inlined Integer& mod ( Integer r,
const Integer n,
const uint32_t  d 
)
inlinestaticinherited

Division q/=d.

Parameters
qquotient
ddivisor.
Returns
q

◆ divmod() [1/3]

Integer & divmod ( Integer q,
Integer r,
const Integer n,
const Integer d 
)
staticinherited

Euclidean division.

n = d q + r . Computes both the quotient and the residue (as in quorem).

Parameters
qas in the formula
ras in the formula
nas in the formula
das in the formula
Returns
the quotient q

◆ divmod() [2/3]

Integer & divmod ( Integer q,
int64_t &  r,
const Integer n,
const int64_t  d 
)
staticinherited

Division q/=d.

Parameters
qquotient
ddivisor.
Returns
q

◆ divmod() [3/3]

Integer & divmod ( Integer q,
uint64_t &  r,
const Integer n,
const uint64_t  d 
)
staticinherited

Division q/=d.

Parameters
qquotient
ddivisor.
Returns
q

◆ ceil() [1/2]

Integer & ceil ( Integer res,
const Integer n,
const Integer d 
)
staticinherited

rounding functions.

these are the same as the STL ones, except for the signature.

Parameters
resthe result
nthe numerator
dthe demominator

same as std::ceil (n/d)

◆ ceil() [2/2]

Integer ceil ( const Integer n,
const Integer d 
)
staticinherited

rounding functions.

these are the same as the STL ones, except for the signature.

Parameters
nthe numerator
dthe demominator
Returns
n/d rounded.

same as std::ceil (n/d)

◆ floor() [1/2]

Integer & floor ( Integer res,
const Integer n,
const Integer d 
)
staticinherited

same as std::floor(n/d)

◆ floor() [2/2]

Integer floor ( const Integer n,
const Integer d 
)
staticinherited

same as std::floor(n/d)

◆ trunc() [1/2]

Integer & trunc ( Integer res,
const Integer n,
const Integer d 
)
staticinherited

same as std::trunc(n/d)

◆ trunc() [2/2]

Integer trunc ( const Integer n,
const Integer d 
)
staticinherited

same as std::trunc(n/d)

◆ operator%() [1/8]

Integer operator% ( const Integer n) const
inherited

Modulo operator.

Parameters
nmodulus
Returns
remainder (*this) mod n

◆ operator%() [2/8]

int64_t operator% ( const uint64_t  n) const
inherited

Division q/=d.

Parameters
qquotient
ddivisor.
Returns
q

◆ operator%() [3/8]

int64_t operator% ( const int64_t  n) const
inherited

Division q/=d.

Parameters
qquotient
ddivisor.
Returns
q

◆ operator%() [4/8]

giv_all_inlined int32_t operator% ( const uint32_t  n) const
inlineinherited

Division q/=d.

Parameters
qquotient
ddivisor.
Returns
q

◆ operator%() [5/8]

giv_all_inlined int32_t operator% ( const int32_t  n) const
inlineinherited

Division q/=d.

Parameters
qquotient
ddivisor.
Returns
q

◆ operator%() [6/8]

double operator% ( const double  n) const
inherited

Division q/=d.

Parameters
qquotient
ddivisor.
Returns
q

◆ operator%() [7/8]

int16_t operator% ( const uint16_t  n) const
inlineinherited

Division q/=d.

Parameters
qquotient
ddivisor.
Returns
q

◆ operator%() [8/8]

XXX operator% ( const XXX &  n) const
inlineinherited

Division q/=d.

Parameters
qquotient
ddivisor.
Returns
q

◆ operator%=() [1/6]

Integer & operator%= ( const Integer n)
inherited

Modulo operator (inplace).

Parameters
nmodulus
Returns
remainder (*this) <- (*this) mod n

◆ operator%=() [2/6]

Integer & operator%= ( const uint64_t  n)
inherited

Division q/=d.

Parameters
qquotient
ddivisor.
Returns
q

◆ operator%=() [3/6]

Integer & operator%= ( const int64_t  n)
inherited

Division q/=d.

Parameters
qquotient
ddivisor.
Returns
q

◆ operator%=() [4/6]

giv_all_inlined Integer& operator%= ( const uint32_t  n)
inlineinherited

Division q/=d.

Parameters
qquotient
ddivisor.
Returns
q

◆ operator%=() [5/6]

giv_all_inlined Integer& operator%= ( const int32_t  n)
inlineinherited

Division q/=d.

Parameters
qquotient
ddivisor.
Returns
q

◆ operator%=() [6/6]

Integer& operator%= ( const XXX &  n)
inlineinherited

Division q/=d.

Parameters
qquotient
ddivisor.
Returns
q

◆ sign()

int32_t sign ( ) const
inlineinherited

sign

◆ priv_sign()

int32_t priv_sign ( ) const
inlineinherited

private sign

◆ get_mpz() [1/2]

mpz_ptr get_mpz ( )
inlineinherited

get representation (constant)

◆ get_mpz() [2/2]

mpz_srcptr get_mpz ( ) const
inlineinherited

get representation (constant)

◆ get_mpz_const()

mpz_srcptr get_mpz_const ( ) const
inlineinherited

get representation (constant)

◆ size()

size_t size ( ) const
inherited

returns the number of machine words used to store *this

◆ size_in_base()

size_t size_in_base ( int32_t  B) const
inherited

returns ceil(log_BASE(*this)).


◆ bitsize()

size_t bitsize ( ) const
inherited

returns ceil(log_2(*this)) .


◆ operator[]()

uint64_t operator[] ( size_t  i) const
inherited

return the i-th word of the integer.

Word 0 is lowest word.

◆ operator++() [1/2]

Integer& operator++ ( )
inlineinherited

◆ operator++() [2/2]

Integer operator++ ( int  )
inlineinherited

◆ operator--() [1/2]

Integer& operator-- ( )
inlineinherited

◆ operator--() [2/2]

Integer operator-- ( int  )
inlineinherited

◆ operator bool()

operator bool ( ) const
inlineinherited

◆ operator int16_t()

operator int16_t ( ) const
inlineinherited

◆ operator uint16_t()

operator uint16_t ( ) const
inlineinherited

◆ operator unsigned char()

operator unsigned char ( ) const
inlineinherited

◆ operator uint32_t()

operator uint32_t ( ) const
inherited

◆ operator int32_t()

operator int32_t ( ) const
inherited

◆ operator signed char()

operator signed char ( ) const
inlineinherited

◆ operator uint64_t()

operator uint64_t ( ) const
inherited

◆ operator int64_t()

operator int64_t ( ) const
inherited

◆ operator std::string()

operator std::string ( ) const
inherited

◆ operator float()

operator float ( ) const
inherited

◆ operator double()

operator double ( ) const
inherited

◆ operator vect_t()

operator Integer::vect_t ( ) const
inherited

◆ operator RecInt::ruint< K >()

operator RecInt::ruint< K > ( ) const
inlineinherited

◆ operator RecInt::rint< K >()

operator RecInt::rint< K > ( ) const
inlineinherited

◆ seeding() [1/3]

void seeding ( uint64_t  s)
inlinestaticinherited

Random numbers (no doc)

◆ seeding() [2/3]

void seeding ( const Integer s)
inlinestaticinherited

Random numbers (no doc)

◆ seeding() [3/3]

void seeding ( )
inlinestaticinherited

◆ RandBool()

bool RandBool ( )
inlinestaticinherited

Random numbers (no doc)

◆ random_lessthan() [1/6]

Integer & random_lessthan ( Integer r,
const Integer m 
)
inlinestaticinherited

returns a random integer r in the intervall [[x, m-1]] where x = 0 or -(m-1) according to ALWAYSPOSITIVE

Bug:
m has to be an integer here.

◆ random_lessthan() [2/6]

Integer & random_lessthan ( Integer r,
const Integer m 
)
inlinestaticinherited

Random numbers (no doc)

◆ random_lessthan() [3/6]

Integer & random_lessthan ( Integer r,
const uint64_t &  m 
)
inlinestaticinherited

Random numbers (no doc)

◆ random_lessthan() [4/6]

Integer & random_lessthan ( Integer r,
const uint64_t &  m 
)
inlinestaticinherited

Random numbers (no doc)

◆ random_lessthan() [5/6]

Integer random_lessthan ( const T &  m)
inlinestaticinherited

Random numbers (no doc)

◆ random_lessthan() [6/6]

Integer random_lessthan ( const T &  m)
inlinestaticinherited

Random numbers (no doc)

◆ random_lessthan_2exp() [1/4]

Integer & random_lessthan_2exp ( Integer r,
const uint64_t &  m 
)
inlinestaticinherited

returns a random integer r in the intervall [[x, 2^m-1]] where x = 0 or -(2^m-1) according to ALWAYSPOSITIVE returns a random integer r of at most m bits

◆ random_lessthan_2exp() [2/4]

Integer & random_lessthan_2exp ( Integer r,
const uint64_t &  m 
)
inlinestaticinherited

Random numbers (no doc)

◆ random_lessthan_2exp() [3/4]

Integer random_lessthan_2exp ( const uint64_t &  m)
inlinestaticinherited

Random numbers (no doc)

◆ random_lessthan_2exp() [4/4]

Integer random_lessthan_2exp ( const uint64_t &  m)
inlinestaticinherited

Random numbers (no doc)

◆ random_exact_2exp() [1/2]

Integer & random_exact_2exp ( Integer r,
const uint64_t &  m 
)
inlinestaticinherited

returns a reference to a random number r of the size m bits, exactly.

◆ random_exact_2exp() [2/2]

Integer & random_exact_2exp ( Integer r,
const uint64_t &  m 
)
inlinestaticinherited

Random numbers (no doc)

◆ random_exact() [1/8]

Integer & random_exact ( Integer r,
const Integer s 
)
inlinestaticinherited

returns a reference to a random number r of the size of s, exactly.

◆ random_exact() [2/8]

Integer & random_exact ( Integer r,
const Integer s 
)
inlinestaticinherited

Random numbers (no doc)

◆ random_exact() [3/8]

Integer & random_exact ( Integer r,
const uint64_t &  m 
)
inlinestaticinherited

Random numbers (no doc)

◆ random_exact() [4/8]

Integer & random_exact ( Integer r,
const uint64_t &  m 
)
inlinestaticinherited

Random numbers (no doc)

◆ random_exact() [5/8]

Integer & random_exact ( Integer r,
const T &  m 
)
inlinestaticinherited

Random numbers (no doc)

◆ random_exact() [6/8]

Integer & random_exact ( Integer r,
const T &  m 
)
inlinestaticinherited

Random numbers (no doc)

◆ random_exact() [7/8]

Integer random_exact ( const T &  s)
inlinestaticinherited

Random numbers (no doc)

◆ random_exact() [8/8]

Integer random_exact ( const T &  s)
inlinestaticinherited

Random numbers (no doc)

◆ random_between() [1/6]

Integer & random_between ( Integer r,
const Integer m,
const Integer M 
)
inlinestaticinherited

Random numbers (no doc)

◆ random_between() [2/6]

Integer random_between ( const Integer m,
const Integer M 
)
inlinestaticinherited

Random numbers (no doc)

◆ random_between() [3/6]

Integer & random_between ( Integer r,
const uint64_t &  m,
const uint64_t &  M 
)
inlinestaticinherited

Random numbers (no doc)

◆ random_between() [4/6]

Integer random_between ( const uint64_t &  m,
const uint64_t &  M 
)
inlinestaticinherited

Random numbers (no doc)

◆ random_between() [5/6]

Integer random_between ( const R &  m,
const R &  M 
)
inlinestaticinherited

Random numbers (no doc)

◆ random_between() [6/6]

Integer & random_between ( Integer r,
const R &  m,
const R &  M 
)
inlinestaticinherited

Random numbers (no doc)

◆ random_between_2exp() [1/2]

Integer & random_between_2exp ( Integer r,
const uint64_t &  m,
const uint64_t &  M 
)
inlinestaticinherited

Random numbers (no doc)

◆ random_between_2exp() [2/2]

Integer random_between_2exp ( const uint64_t &  m,
const uint64_t &  M 
)
inlinestaticinherited

Random numbers (no doc)

◆ random() [1/6]

Integer & random ( Integer r,
const T &  m 
)
inlinestaticinherited

returns a random integer less than...

◆ random() [2/6]

Integer & random ( Integer r,
const T &  m 
)
inlinestaticinherited

Random numbers (no doc)

◆ random() [3/6]

Integer random ( const T &  sz)
inlinestaticinherited

returns a random integer less than...

◆ random() [4/6]

Integer random ( const T &  sz)
inlinestaticinherited

Random numbers (no doc)

◆ random() [5/6]

Integer random
inlinestaticinherited

Random numbers (no doc)

◆ random() [6/6]

Integer random ( )
inlinestaticinherited

Random numbers (no doc)

◆ nonzerorandom() [1/5]

Integer nonzerorandom ( const T &  sz)
inlinestaticinherited

Random numbers (no doc)

◆ nonzerorandom() [2/5]

Integer & nonzerorandom ( Integer r,
const T &  size 
)
inlinestaticinherited

Random numbers (no doc)

◆ nonzerorandom() [3/5]

Integer nonzerorandom ( const T &  sz)
inlinestaticinherited

Random numbers (no doc)

◆ nonzerorandom() [4/5]

Integer & nonzerorandom ( Integer r,
const T &  size 
)
inlinestaticinherited

Random numbers (no doc)

◆ nonzerorandom() [5/5]

Integer nonzerorandom ( )
inlinestaticinherited

Random numbers (no doc)

◆ print()

std::ostream & print ( std::ostream &  o) const
inherited

print32_t integer.

Parameters
ooutput stream.

◆ get_rep()

const Rep* get_rep ( ) const
inlineprotectedinherited

get representation.

Friends And Related Function Documentation

◆ SpyInteger

friend struct SpyInteger
friend

Field Documentation

◆ zero

const Integer zero
staticinherited

zero (0)

◆ one

const Integer one
staticinherited

one (1)

◆ mOne

const Integer mOne
staticinherited

minus one (-1)

◆ gmp_rep

Rep gmp_rep
protectedinherited

rep


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