Unbounded integers as provided by the GMP library. More...
#include <ppl.hh>
Related Functions | |
(Note that these are not member functions.) | |
Accessor Functions | |
const mpz_class & | raw_value (const GMP_Integer &x) |
Returns a const reference to the underlying integer value. | |
mpz_class & | raw_value (GMP_Integer &x) |
Returns a reference to the underlying integer value. | |
Memory Size Inspection Functions | |
memory_size_type | total_memory_in_bytes (const GMP_Integer &x) |
Returns the total size in bytes of the memory occupied by x . | |
memory_size_type | external_memory_in_bytes (const GMP_Integer &x) |
Returns the size in bytes of the memory managed by x . | |
Arithmetic Operators | |
void | neg_assign (GMP_Integer &x) |
Assigns to x its negation. | |
void | neg_assign (GMP_Integer &x, const GMP_Integer &y) |
Assigns to x the negation of y . | |
void | abs_assign (GMP_Integer &x) |
Assigns to x its absolute value. | |
void | abs_assign (GMP_Integer &x, const GMP_Integer &y) |
Assigns to x the absolute value of y . | |
void | rem_assign (GMP_Integer &x, const GMP_Integer &y, const GMP_Integer &z) |
Assigns to x the remainder of the division of y by z . | |
void | gcd_assign (GMP_Integer &x, const GMP_Integer &y, const GMP_Integer &z) |
Assigns to x the greatest common divisor of y and z . | |
void | gcdext_assign (GMP_Integer &x, GMP_Integer &s, GMP_Integer &t, const GMP_Integer &y, const GMP_Integer &z) |
Extended GCD. | |
void | lcm_assign (GMP_Integer &x, const GMP_Integer &y, const GMP_Integer &z) |
Assigns to x the least common multiple of y and z . | |
void | add_mul_assign (GMP_Integer &x, const GMP_Integer &y, const GMP_Integer &z) |
Assigns to x the value x + y * z . | |
void | sub_mul_assign (GMP_Integer &x, const GMP_Integer &y, const GMP_Integer &z) |
Assigns to x the value x - y * z . | |
void | mul_2exp_assign (GMP_Integer &x, const GMP_Integer &y, unsigned int exp) |
Assigns to x the value ![]() | |
void | div_2exp_assign (GMP_Integer &x, const GMP_Integer &y, unsigned int exp) |
Assigns to x the value ![]() | |
void | exact_div_assign (GMP_Integer &x, const GMP_Integer &y, const GMP_Integer &z) |
If z divides y , assigns to x the quotient of the integer division of y and z . | |
void | sqrt_assign (GMP_Integer &x, const GMP_Integer &y) |
Assigns to x the integer square root of y . | |
int | cmp (const GMP_Integer &x, const GMP_Integer &y) |
Returns a negative, zero or positive value depending on whether x is lower than, equal to or greater than y , respectively. |
Unbounded integers as provided by the GMP library.
GMP_Integer is an alias for the mpz_class
type defined in the C++ interface of the GMP library. For more information, see http://www.swox.com/gmp/
const mpz_class & raw_value | ( | const GMP_Integer & | x | ) | [related] |
Returns a const reference to the underlying integer value.
mpz_class & raw_value | ( | GMP_Integer & | x | ) | [related] |
Returns a reference to the underlying integer value.
memory_size_type total_memory_in_bytes | ( | const GMP_Integer & | x | ) | [related] |
Returns the total size in bytes of the memory occupied by x
.
memory_size_type external_memory_in_bytes | ( | const GMP_Integer & | x | ) | [related] |
Returns the size in bytes of the memory managed by x
.
void neg_assign | ( | GMP_Integer & | x | ) | [related] |
Assigns to x
its negation.
void neg_assign | ( | GMP_Integer & | x, | |
const GMP_Integer & | y | |||
) | [related] |
Assigns to x
the negation of y
.
void abs_assign | ( | GMP_Integer & | x | ) | [related] |
Assigns to x
its absolute value.
void abs_assign | ( | GMP_Integer & | x, | |
const GMP_Integer & | y | |||
) | [related] |
Assigns to x
the absolute value of y
.
void rem_assign | ( | GMP_Integer & | x, | |
const GMP_Integer & | y, | |||
const GMP_Integer & | z | |||
) | [related] |
Assigns to x
the remainder of the division of y
by z
.
void gcd_assign | ( | GMP_Integer & | x, | |
const GMP_Integer & | y, | |||
const GMP_Integer & | z | |||
) | [related] |
Assigns to x
the greatest common divisor of y
and z
.
void gcdext_assign | ( | GMP_Integer & | x, | |
GMP_Integer & | s, | |||
GMP_Integer & | t, | |||
const GMP_Integer & | y, | |||
const GMP_Integer & | z | |||
) | [related] |
Extended GCD.
Assigns to x
the greatest common divisor of y
and z
, and to s
and t
the values such that y
* s
+ z
* t
= x
.
void lcm_assign | ( | GMP_Integer & | x, | |
const GMP_Integer & | y, | |||
const GMP_Integer & | z | |||
) | [related] |
Assigns to x
the least common multiple of y
and z
.
void add_mul_assign | ( | GMP_Integer & | x, | |
const GMP_Integer & | y, | |||
const GMP_Integer & | z | |||
) | [related] |
Assigns to x
the value x + y * z
.
void sub_mul_assign | ( | GMP_Integer & | x, | |
const GMP_Integer & | y, | |||
const GMP_Integer & | z | |||
) | [related] |
Assigns to x
the value x - y * z
.
void mul_2exp_assign | ( | GMP_Integer & | x, | |
const GMP_Integer & | y, | |||
unsigned int | exp | |||
) | [related] |
Assigns to x
the value .
void div_2exp_assign | ( | GMP_Integer & | x, | |
const GMP_Integer & | y, | |||
unsigned int | exp | |||
) | [related] |
Assigns to x
the value .
void exact_div_assign | ( | GMP_Integer & | x, | |
const GMP_Integer & | y, | |||
const GMP_Integer & | z | |||
) | [related] |
If z
divides y
, assigns to x
the quotient of the integer division of y
and z
.
The behavior is undefined if z
does not divide y
.
void sqrt_assign | ( | GMP_Integer & | x, | |
const GMP_Integer & | y | |||
) | [related] |
Assigns to x
the integer square root of y
.