ninteger.h File Reference

Provides arbitrary-precision and fixed-precision integer types. More...

`#include <boost/static_assert.hpp>`
`#include <climits>`
`#include <stdint.h>`
`#include <gmp.h>`
`#include <iostream>`
`#include <string>`
`#include "regina-core.h"`
`#include "utilities/intutils.h"`

## Classes

class | regina::NNativeInteger< bytes >
| A wrapper class for a native, fixed-precision integer type of the given size. More...
struct | regina::InfinityBase< supportInfinity >
| Internal base classes for use with NIntegerBase, templated on whether we should support infinity as an allowed value. More...
class | regina::NIntegerBase< supportInfinity >
| Represents an arbitrary precision integer. More...
class | regina::NNativeInteger< bytes >
| A wrapper class for a native, fixed-precision integer type of the given size. More...

## Namespaces

| regina
| Contains the entire Regina calculation engine.

## Macros

#define | mpz_cmp_si_cpp(z, si)
| An internal copy of the GMP signed comparison optimisations. More...

## Typedefs

typedef NIntegerBase< true > | regina::NLargeInteger
| NLargeInteger is a typedef for NIntegerBase<true>, which offers arbitrary precision integers with support for infinity. More...
typedef NIntegerBase< false > | regina::NInteger
| NInteger is a typedef for NIntegerBase<false>, which offers arbitrary precision integers without support for infinity. More...
typedef NNativeInteger< sizeof(long)> | regina::NNativeLong
| NNativeLong is a typedef for the NNativeInteger template class whose underlying integer type is a native long. More...

## Functions

template<bool supportInfinity>
REGINA_API std::ostream & | regina::operator<< (std::ostream &out, const NIntegerBase< supportInfinity > &i)
| Writes the given integer to the given output stream. More...
template<bool supportInfinity>
REGINA_API NIntegerBase< supportInfinity > | regina::operator+ (long lhs, const NIntegerBase< supportInfinity > &rhs)
| Adds the given native integer to the given large integer. More...
template<bool supportInfinity>
REGINA_API NIntegerBase< supportInfinity > | regina::operator* (long lhs, const NIntegerBase< supportInfinity > &rhs)
| Multiplies the given native integer with the given large integer. More...
template<int bytes>
REGINA_API std::ostream & | regina::operator<< (std::ostream &out, const NNativeInteger< bytes > &i)
| Writes the given integer to the given output stream. More...
template<bool supportInfinity>
NIntegerBase< supportInfinity > | regina::operator+ (long lhs, const NIntegerBase< supportInfinity > &rhs)
| Adds the given native integer to the given large integer. More...
template<bool supportInfinity>
NIntegerBase< supportInfinity > | regina::operator* (long lhs, const NIntegerBase< supportInfinity > &rhs)
| Multiplies the given native integer with the given large integer. More...
template<int bytes>
std::ostream & | regina::operator<< (std::ostream &out, const NNativeInteger< bytes > &i)
| Writes the given integer to the given output stream. More...

## Detailed Description

Provides arbitrary-precision and fixed-precision integer types.

## Macro Definition Documentation

#define mpz_cmp_si_cpp | ( |  | z,
|  |  | si
| ) |  |

An internal copy of the GMP signed comparison optimisations.

This macro should not be used outside this class.

By making our own copy of such optimisation macros we can use C++-style casts instead of C-style casts and avoid noisy compiler warnings. I'd love a better way of doing this.

Copyright © 1999-2014, The Regina development team
This software is released under the GNU General Public License, with some additional permissions; see the source code for details.
For further information, or to submit a bug or other problem, please contact Ben Burton (bab@debian.org).