Inherits __mpz_struct.
|
| Integer (const Integer &b) |
| Constructors.
|
|
| Integer (const mpz_t &b) |
| Copy the value from a third party.
|
|
| Integer (mpz_t &&b) noexcept |
|
| Integer (double b) |
| conversion
|
|
| Integer (const Rational &b) |
|
| Integer (const char *s) |
| Recognizes automatically number base 10, 8, or 16, as well as singular values "±inf" and "nan".
|
|
| Integer (size_t n, Reserve) |
| Reserve space for n bits.
|
|
| Integer (gmp_randstate_t rnd, unsigned long bits) |
| Fill with a prescribed number of random bits.
|
|
| Integer (gmp_randstate_t rnd, const Integer &upper) |
| Construct a random number between 0 and upper.
|
|
Integer & | operator= (const Integer &b) |
| Assignment.
|
|
Integer & | operator= (long b) |
| Assignment with conversion.
|
|
Integer & | operator= (unsigned long b) |
| these three are for libnormaliz again
|
|
Integer & | operator= (double b) |
| Assignment with conversion.
|
|
Integer & | operator= (const Rational &b) |
| Assignment will fail if b is not integral.
|
|
Integer & | copy_from (mpz_srcptr src) |
| Assign a copy of data obtained from a third party.
|
|
Integer & | set (const char *s) |
| Recognizes automatically number base 10, 8, or 16, as well as special values "±inf".
|
|
bool | fill_from_file (int fd) |
|
void | swap (Integer &b) noexcept |
| Efficiently swapping two Integer objects.
|
|
| operator double () const |
| Cast to simpler types.
|
|
Integer & | operator++ () |
| Increment.
|
|
Integer & | operator-- () |
| Decrement.
|
|
Integer & | negate () noexcept |
| In-place negation.
|
|
Integer & | operator+= (const Integer &b) |
| Addition.
|
|
Integer & | operator-= (const Integer &b) |
| Subtraction.
|
|
Integer & | operator*= (const Integer &b) |
| Multiplication.
|
|
Integer & | operator/= (const Integer &b) |
| Division with rounding via truncation.
|
|
Integer & | operator%= (const Integer &b) |
| Remainder of division.
|
|
Integer & | div_exact (const Integer &b) |
| b != infinity; but 0/0 allowed
|
|
Integer & | div_exact (long b) |
| 0/0 allowed
|
|
Integer & | operator<<= (long k) |
| Multiply by or divide through 2**k, truncate to zero.
|
|
Integer & | operator>>= (long k) |
| Divide through or multiply by 2**k, truncate to zero.
|
|
bool | bit (unsigned long i) const |
| Test for bits.
|
|
bool | odd () const |
| Parity.
|
|
bool | even () const |
| Parity.
|
|
bool | is_zero () const noexcept |
| fast comparison with 0
|
|
Int | compare (const Integer &b) const |
| Comparison. The magnitude of the return value is arbitrary, only its sign is relevant.
|
|
void | read (std::istream &is, bool allow_sign=true) |
|
size_t | strsize (std::ios::fmtflags flags) const |
| Calculates the size of the buffer needed to store an ASCII representation of an Integer.
|
|
void | putstr (std::ios::fmtflags flags, char *buf) const |
|
Integral number of unlimited precision.
Powered by GMP.