Givaro
|
This is the Integer class. More...
#include <gmp++_int.h>
Public Types | |
typedef std::vector< mp_limb_t > | vect_t |
vector of limbs (ie a gmp number). |
Static Public Member Functions | |
Addition, substraction, multiplication | |
static giv_all_inlined Integer & | addin (Integer &res, const Integer &n) |
Addition (inplace) res+=n . | |
static giv_all_inlined Integer & | addin (Integer &res, const long int n) |
static giv_all_inlined Integer & | addin (Integer &res, const long unsigned int n) |
static giv_all_inlined Integer & | add (Integer &res, const Integer &n1, const Integer &n2) |
Addition res=n1+n2 . | |
static giv_all_inlined Integer & | add (Integer &res, const Integer &n1, const long int n2) |
static giv_all_inlined Integer & | add (Integer &res, const Integer &n1, const long unsigned int n2) |
static giv_all_inlined Integer & | subin (Integer &res, const Integer &n) |
Substraction (inplace) res-=n . | |
static giv_all_inlined Integer & | subin (Integer &res, const long int n) |
static giv_all_inlined Integer & | subin (Integer &res, const long unsigned int n) |
static giv_all_inlined Integer & | sub (Integer &res, const Integer &n1, const Integer &n2) |
Substraction res=n1-n2 . | |
static giv_all_inlined Integer & | sub (Integer &res, const Integer &n1, const long int n2) |
static giv_all_inlined Integer & | sub (Integer &res, const Integer &n1, const long unsigned int n2) |
static giv_all_inlined Integer & | negin (Integer &res) |
Negation (inplace) res=-res . | |
static giv_all_inlined Integer & | neg (Integer &res, const Integer &n) |
Negation res=-n . | |
static giv_all_inlined Integer & | mulin (Integer &res, const Integer &n) |
Multiplication (inplace) res*=n . | |
static giv_all_inlined Integer & | mulin (Integer &res, const long int n) |
static giv_all_inlined Integer & | mulin (Integer &res, const long unsigned int n) |
static giv_all_inlined Integer & | mul (Integer &res, const Integer &n1, const Integer &n2) |
Multiplication res=n1*n2 . | |
static giv_all_inlined Integer & | mul (Integer &res, const Integer &n1, const long int n2) |
static giv_all_inlined Integer & | mul (Integer &res, const Integer &n1, const long unsigned int n2) |
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 Integer & | axpy (Integer &res, const Integer &a, const Integer &x, const Integer &y) |
axpy res = ax+y . | |
static giv_all_inlined Integer & | axpy (Integer &res, const Integer &a, const long unsigned int x, const Integer &y) |
static giv_all_inlined Integer & | axpyin (Integer &res, const Integer &a, const Integer &x) |
axpyin (inplace) res += ax . | |
static giv_all_inlined Integer & | axpyin (Integer &res, const Integer &a, const long unsigned int x) |
static giv_all_inlined Integer & | maxpy (Integer &res, const Integer &a, const Integer &x, const Integer &y) |
maxpy res = y - ax . | |
static giv_all_inlined Integer & | maxpy (Integer &res, const Integer &a, const long unsigned int x, const Integer &y) |
static giv_all_inlined Integer & | maxpyin (Integer &res, const Integer &a, const Integer &x) |
maxpyin res -= ax . | |
static giv_all_inlined Integer & | maxpyin (Integer &res, const Integer &a, const long unsigned int x) |
static giv_all_inlined Integer & | axmy (Integer &res, const Integer &a, const Integer &x, const Integer &y) |
axmy res = ax - y . | |
static giv_all_inlined Integer & | axmy (Integer &res, const Integer &a, const long unsigned int x, const Integer &y) |
static giv_all_inlined Integer & | axmyin (Integer &res, const Integer &a, const Integer &x) |
axmyin (in place) res = ax - res . | |
static giv_all_inlined Integer & | axmyin (Integer &res, const Integer &a, const long unsigned int x) |
Random numbers functions | |
static void | seeding (long unsigned int s) |
Random numbers (no doc) | |
static void | seeding (Integer s) |
Random numbers (no doc) | |
static void | seeding () |
Random numbers (no doc) | |
static bool | RandBool () |
Random numbers (no doc) | |
template<bool ALWAYSPOSITIVE> | |
static Integer & | random_lessthan (Integer &r, const Integer &m) |
returns a random integer r in the intervall [[0, m-1]] | |
static Integer & | random_lessthan (Integer &r, const Integer &m) |
Random numbers (no doc) | |
template<bool ALWAYSPOSITIVE> | |
static Integer & | random_lessthan_2exp (Integer &r, const long unsigned int &m) |
returns a random integer r of at most m bits | |
static Integer & | random_lessthan_2exp (Integer &r, const long unsigned int &m) |
Random numbers (no doc) | |
template<bool ALWAYSPOSITIVE> | |
static Integer | random_lessthan_2exp (const long unsigned int &m) |
Random numbers (no doc) | |
static Integer | random_lessthan_2exp (const long unsigned int &m) |
Random numbers (no doc) | |
template<bool ALWAYSPOSITIVE> | |
static Integer & | random_lessthan (Integer &r, const long unsigned int &m) |
Random numbers (no doc) | |
static Integer & | random_lessthan (Integer &r, const long unsigned int &m) |
Random numbers (no doc) | |
template<bool ALWAYSPOSITIVE, class T > | |
static Integer | random_lessthan (const T &m) |
Random numbers (no doc) | |
template<class T > | |
static Integer | random_lessthan (const T &m) |
Random numbers (no doc) | |
template<bool ALWAYSPOSITIVE> | |
static Integer & | random_exact_2exp (Integer &r, const long unsigned int &m) |
returns a reference to a random number r of the size m bits, exactly. | |
static Integer & | random_exact_2exp (Integer &r, const long unsigned int &m) |
Random numbers (no doc) | |
template<bool ALWAYSPOSITIVE> | |
static Integer & | random_exact (Integer &r, const Integer &s) |
returns a reference to a random number r of the size of s , exactly. | |
static Integer & | random_exact (Integer &r, const Integer &s) |
Random numbers (no doc) | |
template<bool ALWAYSPOSITIVE> | |
static Integer & | random_exact (Integer &r, const long unsigned int &m) |
Random numbers (no doc) | |
static Integer & | random_exact (Integer &r, const long unsigned int &m) |
Random numbers (no doc) | |
template<bool ALWAYSPOSITIVE, class T > | |
static Integer & | random_exact (Integer &r, const T &m) |
Random numbers (no doc) | |
template<class T > | |
static Integer & | random_exact (Integer &r, const T &m) |
Random numbers (no doc) | |
template<bool ALWAYSPOSITIVE, class T > | |
static Integer | random_exact (const T &s) |
Random numbers (no doc) | |
template<class T > | |
static Integer | random_exact (const T &s) |
Random numbers (no doc) | |
static Integer & | random_between (Integer &r, const Integer &m, const Integer &M) |
Random numbers (no doc) | |
static Integer | random_between (const Integer &m, const Integer &M) |
Random numbers (no doc) | |
static Integer & | random_between_2exp (Integer &r, const long unsigned int &m, const long unsigned int &M) |
Random numbers (no doc) | |
static Integer & | random_between (Integer &r, const long unsigned int &m, const long unsigned int &M) |
Random numbers (no doc) | |
static Integer | random_between_2exp (const long unsigned int &m, const long unsigned int &M) |
Random numbers (no doc) | |
static Integer | random_between (const long unsigned int &m, const long unsigned int &M) |
Random numbers (no doc) | |
template<class R > | |
static Integer | random_between (const R &m, const R &M) |
Random numbers (no doc) | |
template<class R > | |
static Integer & | random_between (Integer &r, const R &m, const R &M) |
Random numbers (no doc) | |
template<bool ALWAYSPOSITIVE, class T > | |
static Integer & | random (Integer &r, const T &m) |
returns a random integer less than... | |
template<class T > | |
static Integer & | random (Integer &r, const T &m) |
Random numbers (no doc) | |
template<bool ALWAYSPOSITIVE, class T > | |
static Integer | random (const T &sz) |
returns a random integer less than... | |
template<class T > | |
static Integer | random (const T &sz) |
Random numbers (no doc) | |
template<bool ALWAYSPOSITIVE> | |
static Integer | random () |
Random numbers (no doc) | |
static Integer | random () |
Random numbers (no doc) | |
template<bool ALWAYSPOSITIVE, class T > | |
static Integer | nonzerorandom (const T &sz) |
Random numbers (no doc) | |
template<bool ALWAYSPOSITIVE, class T > | |
static Integer & | nonzerorandom (Integer &r, const T &size) |
Random numbers (no doc) | |
template<class T > | |
static Integer | nonzerorandom (const T &sz) |
Random numbers (no doc) | |
template<class T > | |
static Integer & | nonzerorandom (Integer &r, const T &size) |
Random numbers (no doc) | |
static Integer | nonzerorandom () |
Random numbers (no doc) |
Static Public Attributes | |
static const Integer | zero |
zero (0) | |
static const Integer | one |
one (1) | |
static const Integer | mOne |
minus one (-1) |
Protected Types | |
typedef __mpz_struct | Rep |
Protected Member Functions | |
const Rep * | get_rep () const |
Protected Attributes | |
Rep | gmp_rep |
Friends | |
giv_all_inlined Integer & | powmod (Integer &Res, const Integer &n, const long unsigned int e, const Integer &m) |
modular pow. return ![]() | |
giv_all_inlined Integer & | powmod (Integer &Res, const Integer &n, const long int e, const Integer &m) |
giv_all_inlined Integer & | powmod (Integer &Res, const Integer &n, const unsigned int e, const Integer &m) |
giv_all_inlined Integer & | powmod (Integer &Res, const Integer &n, const int e, const Integer &m) |
giv_all_inlined Integer & | powmod (Integer &Res, const Integer &n, const Integer &e, const Integer &m) |
giv_all_inlined Integer | powmod (const Integer &n, const long unsigned int e, const Integer &m) |
modular pow. | |
giv_all_inlined Integer | powmod (const Integer &n, const long int e, const Integer &m) |
giv_all_inlined Integer | powmod (const Integer &n, const unsigned int e, const Integer &m) |
giv_all_inlined Integer | powmod (const Integer &n, const int e, const Integer &m) |
giv_all_inlined Integer | powmod (const Integer &n, const Integer &e, const Integer &m) |
giv_all_inlined Integer | fact (long unsigned int l) |
fact | |
giv_all_inlined Integer | sqrt (const Integer &p) |
(square) roots | |
giv_all_inlined Integer & | sqrt (Integer &r, const Integer &p) |
(square) roots | |
giv_all_inlined Integer | sqrtrem (const Integer &p, Integer &rem) |
(square) roots | |
giv_all_inlined Integer & | sqrtrem (Integer &r, const Integer &p, Integer &rem) |
(square) roots | |
giv_all_inlined bool | root (Integer &q, const Integer &a, unsigned int n) |
(square) roots | |
giv_all_inlined long | logp (const Integer &a, const Integer &p) |
logs | |
giv_all_inlined double | logtwo (const Integer &a) |
logs | |
giv_all_inlined double | naturallog (const Integer &a) |
logs | |
Arithmetic functions | |
giv_all_inlined Integer | gcd (const Integer &a, const Integer &b) |
gcd. | |
giv_all_inlined Integer | gcd (Integer &u, Integer &v, const Integer &a, const Integer &b) |
giv_all_inlined Integer & | gcd (Integer &g, const Integer &a, const Integer &b) |
giv_all_inlined Integer & | gcd (Integer &g, Integer &u, Integer &v, const Integer &a, const Integer &b) |
giv_all_inlined Integer & | inv (Integer &u, const Integer &a, const Integer &b) |
Inverse. | |
giv_all_inlined Integer & | invin (Integer &u, const Integer &b) |
Compute the inverse inplace u = u/b. | |
giv_all_inlined Integer | pp (const Integer &P, const Integer &Q) |
pp | |
giv_all_inlined Integer & | lcm (Integer &g, const Integer &a, const Integer &b) |
lcm | |
giv_all_inlined Integer | lcm (const Integer &a, const Integer &b) |
lcm | |
giv_all_inlined Integer & | pow (Integer &Res, const Integer &n, const long int l) |
pow. | |
giv_all_inlined Integer & | pow (Integer &Res, const long unsigned int n, const long unsigned int l) |
giv_all_inlined Integer & | pow (Integer &Res, const Integer &n, const long unsigned int l) |
giv_all_inlined Integer & | pow (Integer &Res, const Integer &n, const int l) |
giv_all_inlined Integer & | pow (Integer &Res, const Integer &n, const unsigned int l) |
giv_all_inlined Integer | pow (const Integer &n, const long int l) |
pow. | |
giv_all_inlined Integer | pow (const Integer &n, const long unsigned int l) |
giv_all_inlined Integer | pow (const Integer &n, const int l) |
giv_all_inlined Integer | pow (const Integer &n, const unsigned int l) |
primes | |
giv_all_inlined Integer & | prevprime (Integer &, const Integer &p) |
giv_all_inlined Integer & | nextprime (Integer &, const Integer &p) |
giv_all_inlined int | probab_prime (const Integer &p) |
giv_all_inlined int | probab_prime (const Integer &p, int r) |
giv_all_inlined int | jacobi (const Integer &u, const Integer &v) |
giv_all_inlined int | legendre (const Integer &u, const Integer &v) |
Comparisons functions. | |
giv_all_inlined friend int | compare (const Integer &a, const Integer &b) |
Compares two integers. | |
giv_all_inlined friend int | absCompare (const Integer &a, const Integer &b) |
Compare the norm of two integers. | |
giv_all_inlined friend int | absCompare (const Integer &a, const double b) |
giv_all_inlined friend int | absCompare (const Integer &a, const float b) |
giv_all_inlined friend int | absCompare (const Integer &a, const long unsigned b) |
giv_all_inlined friend int | absCompare (const Integer &a, const unsigned b) |
giv_all_inlined friend int | absCompare (const Integer &a, const long int b) |
giv_all_inlined friend int | absCompare (const Integer &a, const int b) |
template<class T > | |
giv_all_inlined friend int | absCompare (const T a, const Integer &b) |
giv_all_inlined int | isOne (const Integer &a) |
name compare to 1 and 0 | |
giv_all_inlined int | nonZero (const Integer &a) |
name compare to 1 and 0 | |
giv_all_inlined int | isZero (const Integer &a) |
name compare to 1 and 0 | |
giv_all_inlined int | isZero (const short int a) |
giv_all_inlined int | isZero (const int a) |
giv_all_inlined int | isZero (const long int a) |
giv_all_inlined int | isZero (const unsigned short int a) |
giv_all_inlined int | isZero (const unsigned int a) |
giv_all_inlined int | isZero (const long unsigned int a) |
template<class A , class B > | |
static giv_all_inlined bool | isleq (const A &a, const B &b) |
isleq |
Comparison operators. | |
giv_all_inlined int | operator>= (const Integer &l) const |
greater or equal. | |
giv_all_inlined int | operator>= (const int l) const |
giv_all_inlined int | operator>= (const long int l) const |
giv_all_inlined int | operator>= (const long unsigned int l) const |
giv_all_inlined int | operator>= (const unsigned int l) const |
giv_all_inlined int | operator>= (const double l) const |
giv_all_inlined int | operator>= (const float l) const |
giv_all_inlined int | operator<= (const Integer &l) const |
less or equal | |
giv_all_inlined int | operator<= (const int l) const |
giv_all_inlined int | operator<= (const long int l) const |
giv_all_inlined int | operator<= (const long unsigned int l) const |
giv_all_inlined int | operator<= (const unsigned int l) const |
giv_all_inlined int | operator<= (const double l) const |
giv_all_inlined int | operator<= (const float l) const |
giv_all_inlined int | operator!= (const Integer &l) const |
operator != (not equal) | |
giv_all_inlined int | operator!= (const int l) const |
giv_all_inlined int | operator!= (const long int l) const |
giv_all_inlined int | operator!= (const long unsigned int l) const |
giv_all_inlined int | operator!= (const unsigned int l) const |
giv_all_inlined int | operator!= (const double l) const |
giv_all_inlined int | operator!= (const float l) const |
giv_all_inlined int | operator== (const Integer &l) const |
Equality. | |
giv_all_inlined int | operator== (const int l) const |
giv_all_inlined int | operator== (const long int l) const |
giv_all_inlined int | operator== (const long unsigned int l) const |
giv_all_inlined int | operator== (const unsigned int l) const |
giv_all_inlined int | operator== (const double l) const |
giv_all_inlined int | operator== (const float l) const |
giv_all_inlined int | operator> (const Integer &l) const |
greater (strict) | |
giv_all_inlined int | operator> (const int l) const |
giv_all_inlined int | operator> (const long int l) const |
giv_all_inlined int | operator> (const long unsigned int l) const |
giv_all_inlined int | operator> (const unsigned int l) const |
giv_all_inlined int | operator> (const double l) const |
giv_all_inlined int | operator> (const float l) const |
giv_all_inlined int | operator< (const Integer &l) const |
less (strict) | |
giv_all_inlined int | operator< (const int l) const |
giv_all_inlined int | operator< (const long int l) const |
giv_all_inlined int | operator< (const long unsigned int l) const |
giv_all_inlined int | operator< (const unsigned int l) const |
giv_all_inlined int | operator< (const double l) const |
giv_all_inlined int | operator< (const float l) const |
giv_all_inlined friend int | operator>= (unsigned int l, const Integer &n) |
greater or equal. | |
giv_all_inlined friend int | operator>= (float l, const Integer &n) |
giv_all_inlined friend int | operator>= (double l, const Integer &n) |
giv_all_inlined friend int | operator>= (int l, const Integer &n) |
giv_all_inlined friend int | operator>= (long int l, const Integer &n) |
giv_all_inlined friend int | operator>= (long unsigned int l, const Integer &n) |
giv_all_inlined friend int | operator<= (unsigned int l, const Integer &n) |
less or equal | |
giv_all_inlined friend int | operator<= (float l, const Integer &n) |
giv_all_inlined friend int | operator<= (double l, const Integer &n) |
giv_all_inlined friend int | operator<= (int l, const Integer &n) |
giv_all_inlined friend int | operator<= (long int l, const Integer &n) |
giv_all_inlined friend int | operator<= (long unsigned int l, const Integer &n) |
giv_all_inlined friend int | operator!= (unsigned int l, const Integer &n) |
operator != (not equal) | |
giv_all_inlined friend int | operator!= (float l, const Integer &n) |
giv_all_inlined friend int | operator!= (double l, const Integer &n) |
giv_all_inlined friend int | operator!= (int l, const Integer &n) |
giv_all_inlined friend int | operator!= (long int l, const Integer &n) |
giv_all_inlined friend int | operator!= (long unsigned int l, const Integer &n) |
giv_all_inlined friend int | operator== (unsigned int l, const Integer &n) |
Equality. | |
giv_all_inlined friend int | operator== (float l, const Integer &n) |
giv_all_inlined friend int | operator== (double l, const Integer &n) |
giv_all_inlined friend int | operator== (int l, const Integer &n) |
giv_all_inlined friend int | operator== (long int l, const Integer &n) |
giv_all_inlined friend int | operator== (long unsigned int l, const Integer &n) |
giv_all_inlined friend int | operator> (unsigned int l, const Integer &n) |
greater (strict) | |
giv_all_inlined friend int | operator> (float l, const Integer &n) |
giv_all_inlined friend int | operator> (double l, const Integer &n) |
giv_all_inlined friend int | operator> (int l, const Integer &n) |
giv_all_inlined friend int | operator> (long int l, const Integer &n) |
giv_all_inlined friend int | operator> (long unsigned int l, const Integer &n) |
giv_all_inlined friend int | operator< (unsigned int l, const Integer &n) |
less (strict) | |
giv_all_inlined friend int | operator< (float l, const Integer &n) |
giv_all_inlined friend int | operator< (double l, const Integer &n) |
giv_all_inlined friend int | operator< (int l, const Integer &n) |
giv_all_inlined friend int | operator< (long int l, const Integer &n) |
giv_all_inlined friend int | operator< (long unsigned int l, const Integer &n) |
Division/euclidean division/modulo | |
The convention for rounding are the following :
| |
giv_all_inlined Integer | operator/ (const Integer &d) const |
Division operator. | |
giv_all_inlined Integer | operator/ (const long unsigned int d) const |
giv_all_inlined Integer | operator/ (const long int d) const |
giv_all_inlined Integer & | operator/= (const Integer &d) |
Division operator (inplace). | |
giv_all_inlined Integer & | operator/= (const long unsigned int d) |
giv_all_inlined Integer & | operator/= (const long int d) |
template<class XXX > | |
Integer & | operator/= (const XXX &d) |
giv_all_inlined Integer | operator% (const Integer &n) const |
Modulo operator. | |
giv_all_inlined long | operator% (const long unsigned int n) const |
giv_all_inlined long | operator% (const long int n) const |
giv_all_inlined double | operator% (const double n) const |
short | operator% (const unsigned short n) const |
template<class XXX > | |
XXX | operator% (const XXX &n) const |
giv_all_inlined Integer & | operator%= (const Integer &n) |
Modulo operator (inplace). | |
giv_all_inlined Integer & | operator%= (const long unsigned int n) |
giv_all_inlined Integer & | operator%= (const long int n) |
template<class XXX > | |
Integer & | operator%= (const XXX &n) |
giv_all_inlined Integer | operator/ (const int l, const Integer &n) |
operator / | |
giv_all_inlined Integer | operator/ (const long int l, const Integer &n) |
giv_all_inlined Integer | operator/ (const Integer &n, const int l) |
giv_all_inlined Integer | operator/ (const Integer &n, const unsigned int l) |
giv_all_inlined Integer & | operator/= (Integer &n, const int l) |
operator /= | |
giv_all_inlined Integer & | operator/= (Integer &n, const long int l) |
giv_all_inlined Integer & | operator/= (Integer &n, const unsigned int l) |
giv_all_inlined Integer | operator% (const int l, const Integer &n) |
operator % | |
giv_all_inlined Integer | operator% (const long int l, const Integer &n) |
giv_all_inlined Integer | operator% (const Integer &n, const int l) |
giv_all_inlined Integer | operator% (const Integer &n, const unsigned int l) |
giv_all_inlined Integer & | operator%= (Integer &n, const int l) |
giv_all_inlined Integer & | operator%= (Integer &n, const unsigned int l) |
static giv_all_inlined Integer & | divin (Integer &q, const Integer &d) |
Division q/=d . | |
static giv_all_inlined Integer & | divin (Integer &q, const long int d) |
static giv_all_inlined Integer & | divin (Integer &q, const long unsigned int d) |
static giv_all_inlined Integer & | div (Integer &q, const Integer &n, const Integer &d) |
Division q=n/d . | |
static giv_all_inlined Integer & | div (Integer &q, const Integer &n, const long int d) |
static giv_all_inlined Integer & | div (Integer &q, const Integer &n, const int d) |
static giv_all_inlined Integer & | div (Integer &q, const Integer &n, const long unsigned int d) |
static giv_all_inlined Integer & | divexact (Integer &q, const Integer &n, const Integer &d) |
Division when d divides n . | |
static giv_all_inlined Integer | divexact (const Integer &n, const Integer &d) |
Division when d divides n . | |
static giv_all_inlined Integer & | modin (Integer &r, const Integer &n) |
Function mod (inplace). | |
static giv_all_inlined Integer & | modin (Integer &r, const long int n) |
static giv_all_inlined Integer & | modin (Integer &r, const long unsigned int n) |
static giv_all_inlined Integer & | mod (Integer &r, const Integer &n, const Integer &d) |
Function mod . | |
static giv_all_inlined Integer & | mod (Integer &r, const Integer &n, const long int d) |
static giv_all_inlined Integer & | mod (Integer &r, const Integer &n, const long unsigned int d) |
static giv_all_inlined Integer & | divmod (Integer &q, Integer &r, const Integer &n, const Integer &d) |
Euclidean division. | |
static giv_all_inlined Integer & | divmod (Integer &q, long int &r, const Integer &n, const long int d) |
static giv_all_inlined Integer & | divmod (Integer &q, long unsigned int &r, const Integer &n, const long unsigned int d) |
static giv_all_inlined Integer & | ceil (Integer &res, const Integer &n, const Integer &d) |
rounding functions. | |
static giv_all_inlined Integer & | floor (Integer &res, const Integer &n, const Integer &d) |
static giv_all_inlined Integer & | trunc (Integer &res, const Integer &n, const Integer &d) |
static giv_all_inlined Integer | ceil (const Integer &n, const Integer &d) |
rounding functions. | |
static giv_all_inlined Integer | floor (const Integer &n, const Integer &d) |
static giv_all_inlined Integer | trunc (const Integer &n, const Integer &d) |
Miscellaneous. | |
int | sign () const |
sign | |
int | priv_sign () const |
private sign | |
giv_all_inlined void | swap (Integer &a, Integer &b) |
int | sign (const Integer &a) |
sign |
representation | |
get representation | |
mpz_ptr | get_mpz () |
get representation (constant) | |
mpz_srcptr | get_mpz_const () const |
get representation (constant) | |
giv_all_inlined size_t | size () const |
returns the number of machine words used to store *this | |
giv_all_inlined size_t | size_in_base (int B) const |
returns ceil(log_BASE(*this)) . | |
giv_all_inlined size_t | bitsize () const |
returns ceil(log_2(*this)) . | |
giv_all_inlined long unsigned | operator[] (size_t i) const |
return the i-th word of the integer. | |
giv_all_inlined long unsigned int | length (const Integer &a) |
returns the number of bytes used to store *this | |
giv_all_inlined int | isperfectpower (const Integer &n) |
perfect power | |
giv_all_inlined Integer | abs (const Integer &n) |
absolute value |
I/O | |
giv_all_inlined std::ostream & | print (std::ostream &o) const |
print integer. | |
giv_all_inlined std::istream & | operator>> (std::istream &i, Integer &n) |
Input/Output of Integers. | |
giv_all_inlined std::ostream & | operator<< (std::ostream &o, const Integer &n) |
out operator. | |
giv_all_inlined std::ostream & | absOutput (std::ostream &o, const Integer &n) |
nodoc | |
giv_all_inlined void | importWords (Integer &x, size_t count, int order, int size, int endian, size_t nails, const void *op) |
nodoc |
This is the Integer class.
An Integer is represented as a GMP integer. This class provides arithmetic on Integers.
typedef std::vector<mp_limb_t> vect_t |
vector of limbs (ie a gmp number).
|
protected |
rep type
Integer | ( | int | n = 0 | ) |
Constructor form a known type.
n | input to be constructed from |
Integer | ( | long int | n | ) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Integer | ( | unsigned char | n | ) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Integer | ( | unsigned int | n | ) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Integer | ( | long unsigned int | n | ) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Integer | ( | double | n | ) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Integer | ( | const char * | n | ) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
giv_all_inlined Integer | ( | long unsigned * | d, |
long | sz | ||
) |
Creates a new Integer from pointers.
d | array |
sz | size |
Creates a new Integers for a vector of limbs.
v | vector of limbs |
~Integer | ( | ) |
destructor
|
inlinestatic |
isleq
a,b |
int operator>= | ( | const Integer & | l | ) | const |
greater or equal.
l | integer to be compared to |
int operator>= | ( | const int | l | ) | const |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
int operator>= | ( | const long int | l | ) | const |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
int operator>= | ( | const long unsigned int | l | ) | const |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
int operator>= | ( | const unsigned int | l | ) | const |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
int operator>= | ( | const double | l | ) | const |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
int operator>= | ( | const float | l | ) | const |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
int operator<= | ( | const Integer & | l | ) | const |
less or equal
l | integer to be compared to |
int operator<= | ( | const int | l | ) | const |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
int operator<= | ( | const long int | l | ) | const |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
int operator<= | ( | const long unsigned int | l | ) | const |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
int operator<= | ( | const unsigned int | l | ) | const |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
int operator<= | ( | const double | l | ) | const |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
int operator<= | ( | const float | l | ) | const |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
int operator!= | ( | const Integer & | l | ) | const |
operator != (not equal)
l | integer |
1
iff l == this int operator!= | ( | const int | l | ) | const |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
int operator!= | ( | const long int | l | ) | const |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
int operator!= | ( | const long unsigned int | l | ) | const |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
int operator!= | ( | const unsigned int | l | ) | const |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
int operator!= | ( | const double | l | ) | const |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
int operator!= | ( | const float | l | ) | const |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
int operator== | ( | const Integer & | l | ) | const |
Equality.
l | integer to be compared to |
int operator== | ( | const int | l | ) | const |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
int operator== | ( | const long int | l | ) | const |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
int operator== | ( | const long unsigned int | l | ) | const |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
int operator== | ( | const unsigned int | l | ) | const |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
int operator== | ( | const double | l | ) | const |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
int operator== | ( | const float | l | ) | const |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
int operator> | ( | const Integer & | l | ) | const |
greater (strict)
l | integer to be compared to |
int operator> | ( | const int | l | ) | const |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
int operator> | ( | const long int | l | ) | const |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
int operator> | ( | const long unsigned int | l | ) | const |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
int operator> | ( | const unsigned int | l | ) | const |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
int operator> | ( | const double | l | ) | const |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
int operator> | ( | const float | l | ) | const |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
int operator< | ( | const Integer & | l | ) | const |
less (strict)
l | integer to be compared to |
int operator< | ( | const int | l | ) | const |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
int operator< | ( | const long int | l | ) | const |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
int operator< | ( | const long unsigned int | l | ) | const |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
int operator< | ( | const unsigned int | l | ) | const |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
int operator< | ( | const double | l | ) | const |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
int operator< | ( | const float | l | ) | const |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Integer operator^ | ( | const long unsigned int & | a | ) | const |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Integer operator^ | ( | const unsigned int & | a | ) | const |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Integer & operator^= | ( | const long unsigned int & | a | ) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Integer & operator^= | ( | const unsigned int & | a | ) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Integer operator| | ( | const long unsigned int & | a | ) | const |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Integer operator| | ( | const unsigned int & | a | ) | const |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Integer & operator|= | ( | const long unsigned int & | a | ) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Integer & operator|= | ( | const unsigned int & | a | ) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
unsigned int operator& | ( | const unsigned int & | a | ) | const |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
long unsigned operator& | ( | const long unsigned int & | a | ) | const |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Integer & operator&= | ( | const long unsigned int & | a | ) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Integer & operator&= | ( | const unsigned int & | a | ) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Integer operator~ | ( | ) | const |
complement to 1 (~)
Integer operator<< | ( | int | l | ) | const |
left shift (<<)
l | shift |
Integer operator<< | ( | long int | l | ) | const |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Integer operator<< | ( | unsigned int | l | ) | const |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Integer operator<< | ( | long unsigned int | l | ) | const |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Integer & operator<<= | ( | int | l | ) |
left shift inplace (<<=)
l | shift |
Integer & operator<<= | ( | long int | l | ) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Integer & operator<<= | ( | unsigned int | l | ) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Integer & operator<<= | ( | long unsigned int | l | ) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Integer operator>> | ( | int | l | ) | const |
right shift (>>)
l | shift |
Integer operator>> | ( | long int | l | ) | const |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Integer operator>> | ( | unsigned int | l | ) | const |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Integer operator>> | ( | long unsigned int | l | ) | const |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Integer & operator>>= | ( | int | l | ) |
right shift inplace (>>=)
l | shift |
Integer & operator>>= | ( | long int | l | ) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Integer & operator>>= | ( | unsigned int | l | ) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Integer & operator>>= | ( | long unsigned int | l | ) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Addition (inplace) res+=n
.
res | as in the formula |
n | as in the formula |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Addition res=n1+n2
.
res | as in the formula |
n1 | as in the formula |
n2 | as in the formula |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Substraction (inplace) res-=n
.
res | as in the formula |
n | as in the formula |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Substraction res=n1-n2
.
res | as in the formula |
n1 | as in the formula |
n2 | as in the formula |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Negation (inplace) res=-res
.
res | as in the formula |
Negation res=-n
.
n | as in the formula |
res | as in the formula |
Multiplication (inplace) res*=n
.
res | as in the formula |
n | as in the formula |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Multiplication res=n1*n2
.
res | as in the formula |
n1 | as in the formula |
n2 | as in the formula |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
operator +
.
(*this)+n
n | as in the formula. |
Integer operator+ | ( | const long unsigned int | n | ) | const |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Integer operator+ | ( | const long int | n | ) | const |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
operator +=
.
n | asfriend In the formula. |
(*this) += n
. Integer & operator+= | ( | const long unsigned int | n | ) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Integer & operator+= | ( | const long int | n | ) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
|
inline |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
operator -
.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
@return <code> (*this)-n</code> @param n as in the formula.
Integer operator- | ( | const long unsigned int | n | ) | const |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Integer operator- | ( | const long int | n | ) | const |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
operator -=
.
n | as in the formula. |
(*this) -= n
. Integer & operator-= | ( | const long unsigned int | n | ) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Integer & operator-= | ( | const long int | n | ) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
|
inline |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Integer operator- | ( | ) | const |
Opposite.
-(*this)
. operator *
.
(*this)*n
n | as in the formula. |
Integer operator* | ( | const long unsigned int | n | ) | const |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Integer operator* | ( | const long int | n | ) | const |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
operator *=
.
n | as in the formula. |
(*this) *= n
. Integer & operator*= | ( | const long unsigned int | n | ) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Integer & operator*= | ( | const long int | n | ) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
|
inline |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
axpy res = ax+y
.
res | Integers as in the forumla |
a | Integers as in the forumla |
x | Integers as in the forumla |
y | Integers as in the forumla |
|
static |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
axpyin (inplace) res += ax
.
res | Integers as in the formula. |
a | Integers as in the formula. |
x | Integers as in the formula. |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
maxpy res = y - ax
.
res | Integers as in the formula. |
a | Integers as in the formula. |
x | Integers as in the formula. |
y | Integers as in the formula. |
|
static |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
maxpyin res -= ax
.
res | Integers as in the formula. |
a | Integers as in the formula. |
x | Integers as in the formula. |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
axmy res = ax - y
.
res | Integers as in the formula. |
a | Integers as in the formula. |
x | Integers as in the formula. |
y | Integers as in the formula. |
|
static |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
axmyin (in place) res = ax - res
.
res | Integers as in the formula. |
a | Integers as in the formula. |
x | Integers as in the formula. |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Division q/=d
.
q | quotient |
d | divisor. |
q
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Division q=n/d
.
q | quotient |
n | dividand. |
d | divisor |
q
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Division when d
divides n
.
q | exact quotient |
n | dividend |
d | divisor |
Division when d
divides n
.
n | dividend |
d | divisor |
n/d
Integer operator/ | ( | const long unsigned int | d | ) | const |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Integer operator/ | ( | const long int | d | ) | const |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Integer & operator/= | ( | const long unsigned int | d | ) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Integer & operator/= | ( | const long int | d | ) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
|
inline |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Function mod
(inplace).
r | remainder |
n | modulus |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Function mod
.
r | remainder |
n | integer |
d | modulus |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Euclidean division.
n = d q + r
. Computes both the quotient and the residue (as in quorem).
q | as in the formula |
r | as in the formula |
n | as in the formula |
d | as in the formula |
q
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
|
static |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
rounding functions.
these are the same as the STL ones, except for the signature. @param res the result @param n the numerator @param d the demominator
same as std::ceil (n/d)
same as std::floor(n/d)
same as std::trunc(n/d)
rounding functions.
these are the same as the STL ones, except for the signature. @param n the numerator @param d the demominator @return n/d rounded.
same as std::ceil (n/d)
Modulo operator.
n | modulus |
(*this) mod n
long operator% | ( | const long unsigned int | n | ) | const |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
long operator% | ( | const long int | n | ) | const |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
double operator% | ( | const double | n | ) | const |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
|
inline |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
|
inline |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Modulo operator (inplace).
n | modulus |
(*this) <- (*this) mod n
Integer & operator%= | ( | const long unsigned int | n | ) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Integer & operator%= | ( | const long int | n | ) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
|
inline |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
|
inline |
sign
|
inline |
private sign
|
inline |
get representation (constant)
|
inline |
get representation (constant)
size_t size | ( | ) | const |
returns the number of machine words used to store *this
size_t size_in_base | ( | int | B | ) | const |
returns ceil(log_BASE(*this))
.
size_t bitsize | ( | ) | const |
returns ceil(log_2(*this))
.
long unsigned operator[] | ( | size_t | i | ) | const |
return the i-th word of the integer.
Word 0 is lowest word.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
operator unsigned int | ( | ) | const |
operator int | ( | ) | const |
|
inline |
operator long unsigned | ( | ) | const |
operator long | ( | ) | const |
operator long long unsigned | ( | ) | const |
operator long long | ( | ) | const |
operator std::string | ( | ) | const |
operator float | ( | ) | const |
operator double | ( | ) | const |
operator Integer::vect_t | ( | ) | const |
|
inlinestatic |
Random numbers (no doc)
|
inlinestatic |
Random numbers (no doc)
|
inlinestatic |
Random numbers (no doc)
|
inlinestatic |
Random numbers (no doc)
returns a random integer r
in the intervall [[0, m-1]]
Random numbers (no doc)
returns a random integer r
of at most m
bits
Random numbers (no doc)
|
inlinestatic |
Random numbers (no doc)
|
inlinestatic |
Random numbers (no doc)
Random numbers (no doc)
Random numbers (no doc)
|
inlinestatic |
Random numbers (no doc)
|
inlinestatic |
Random numbers (no doc)
returns a reference to a random number r
of the size m
bits, exactly.
Random numbers (no doc)
returns a reference to a random number r
of the size of s
, exactly.
Random numbers (no doc)
Random numbers (no doc)
Random numbers (no doc)
|
inlinestatic |
Random numbers (no doc)
|
inlinestatic |
Random numbers (no doc)
Random numbers (no doc)
Random numbers (no doc)
|
inlinestatic |
Random numbers (no doc)
|
inlinestatic |
Random numbers (no doc)
|
inlinestatic |
Random numbers (no doc)
|
inlinestatic |
Random numbers (no doc)
|
inlinestatic |
Random numbers (no doc)
Random numbers (no doc)
|
inlinestatic |
returns a random integer less than...
|
inlinestatic |
Random numbers (no doc)
|
inlinestatic |
Random numbers (no doc)
|
inlinestatic |
Random numbers (no doc)
|
inlinestatic |
Random numbers (no doc)
|
inlinestatic |
Random numbers (no doc)
|
inlinestatic |
Random numbers (no doc)
std::ostream & print | ( | std::ostream & | o | ) | const |
print integer.
o | output stream. |
|
inlineprotected |
get representation.
|
friend |
Compares two integers.
a | integer |
b | integer |
1
if 0
if -1
otherwise.
|
friend |
Compare the norm of two integers.
a | integer |
b | integer |
1
if 0
if -1
otherwise.
|
friend |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
|
friend |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
|
friend |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
|
friend |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
|
friend |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
|
friend |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
|
friend |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
|
friend |
name compare to 1 and 0
a |
|
friend |
name compare to 1 and 0
a |
|
friend |
name compare to 1 and 0
a |
|
friend |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
|
friend |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
|
friend |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
|
friend |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
|
friend |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
|
friend |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
|
friend |
greater or equal.
l,n | integers to compare |
|
friend |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
|
friend |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
|
friend |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
|
friend |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
|
friend |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
|
friend |
less or equal
l,n | integers to compare |
|
friend |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
|
friend |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
|
friend |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
|
friend |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
|
friend |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
|
friend |
operator != (not equal)
l,n | integer |
1
iff l == n
|
friend |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
|
friend |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
|
friend |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
|
friend |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
|
friend |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
|
friend |
Equality.
l,n | integers to compare |
|
friend |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
|
friend |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
|
friend |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
|
friend |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
|
friend |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
|
friend |
greater (strict)
l,n | integers to compare |
|
friend |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
|
friend |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
|
friend |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
|
friend |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
|
friend |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
|
friend |
less (strict)
l,n | integers to compare |
|
friend |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
|
friend |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
|
friend |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
|
friend |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
|
friend |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
|
friend |
operator +.
l,n | to be added |
|
friend |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
|
friend |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
|
friend |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
|
friend |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
|
friend |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
|
friend |
operator +=.
n | Integer |
l | to be added up |
|
friend |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
|
friend |
operator -
l,n | to be substracted |
|
friend |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
|
friend |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
|
friend |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
|
friend |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
|
friend |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
|
friend |
operator -=
l,n | to be substracted |
|
friend |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
|
friend |
operator *
l,n | to be multpct |
|
friend |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
|
friend |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
|
friend |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
|
friend |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
|
friend |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
|
friend |
operator *=
l,n | to be multpct |
|
friend |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
|
friend |
operator /
|
friend |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
|
friend |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
|
friend |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
|
friend |
operator /=
|
friend |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
|
friend |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
|
friend |
operator %
l | |
n |
|
friend |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
|
friend |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
|
friend |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
|
friend |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
|
friend |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
|
friend |
gcd.
a,b | integers |
|
friend |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
|
friend |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
|
friend |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
|
friend |
Inverse.
Compute the inverse u = a/b.
u | |
a | |
b |
|
friend |
Compute the inverse inplace u = u/b.
u | |
b |
|
friend |
pp
P,Q | params |
|
friend |
lcm
g,a,b |
|
friend |
lcm
a,b |
|
friend |
pow.
return
Res,n,l |
|
friend |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
|
friend |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
|
friend |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
|
friend |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
|
friend |
pow.
return
n,l |
|
friend |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
|
friend |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
|
friend |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
|
friend |
modular pow. return .
|
friend |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
|
friend |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
|
friend |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
|
friend |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
|
friend |
modular pow.
return .
n,e,m |
|
friend |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
|
friend |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
|
friend |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
|
friend |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
|
friend |
fact
l |
|
friend |
(square) roots
p |
|
friend |
(square) roots
r,p |
|
friend |
(square) roots
p,rem |
|
friend |
(square) roots
r,p,rem |
|
friend |
(square) roots
q,a,n |
|
friend |
logs
a,p |
|
friend |
logs
a |
|
friend |
logs
a |
|
friend |
swap
a,b |
|
friend |
sign
a |
|
friend |
returns the number of bytes used to store *this
a |
|
friend |
perfect power
|
friend |
absolute value
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
Input/Output of Integers.
in operator.
i | input stream |
n | integer to be built |
|
friend |
out operator.
o | output stream |
n | integer to be printed |
|
friend |
nodoc
o | output |
n | integer |
|
friend |
nodoc
x | x |
count | x |
order | x |
size | x |
endian | x |
nails | x |
op | x |
|
static |
zero (0)
|
static |
one (1)
|
static |
minus one (-1)
|
protected |
rep