- Home
- About DUNE
- Download
- Documentation
- Community
- Development
Portable very large unsigned integers. More...
#include <dune/common/bigunsignedint.hh>
Public Types | |
enum | { bits = std::numeric_limits<unsigned short>::digits, n = k/bits+(kbits!=0), hexdigits = 4, bitmask = 0xFFFF, compbitmask = 0xFFFF0000, overflowmask = 0x1 } |
Public Member Functions | |
bigunsignedint () | |
Construct uninitialized. | |
bigunsignedint (int x) | |
Construct from signed int. | |
bigunsignedint (std::size_t x) | |
Construct from unsigned int. | |
void | print (std::ostream &s) const |
Print number in hex notation. | |
bigunsignedint< k > | operator+ (const bigunsignedint< k > &x) const |
add | |
bigunsignedint< k > | operator- (const bigunsignedint< k > &x) const |
subtract | |
bigunsignedint< k > | operator* (const bigunsignedint< k > &x) const |
multiply | |
bigunsignedint< k > & | operator++ () |
prefix increment | |
bigunsignedint< k > | operator/ (const bigunsignedint< k > &x) const |
bigunsignedint< k > | operator% (const bigunsignedint< k > &x) const |
bigunsignedint< k > | operator& (const bigunsignedint< k > &x) const |
bitwise and | |
bigunsignedint< k > | operator^ (const bigunsignedint< k > &x) const |
bitwise exor | |
bigunsignedint< k > | operator| (const bigunsignedint< k > &x) const |
bitwise or | |
bigunsignedint< k > | operator~ () const |
bitwise komplement | |
bigunsignedint< k > | operator<< (int i) const |
left shift1/ | |
bigunsignedint< k > | operator>> (int i) const |
right shift | |
bool | operator< (const bigunsignedint< k > &x) const |
less than | |
bool | operator<= (const bigunsignedint< k > &x) const |
less than or equal | |
bool | operator> (const bigunsignedint< k > &x) const |
greater than | |
bool | operator>= (const bigunsignedint< k > &x) const |
greater or equal | |
bool | operator== (const bigunsignedint< k > &x) const |
equal | |
bool | operator!= (const bigunsignedint< k > &x) const |
not equal | |
unsigned int | touint () const |
export to other types | |
double | todouble () const |
Convert to a double. | |
Friends | |
class | bigunsignedint< k/2 > |
struct | std::numeric_limits< bigunsignedint< k > > |
class | MPITraits< bigunsignedint< k > > |
Portable very large unsigned integers.
Implements (arbitrarily) large unsigned integers to be used as global ids in some grid managers. Size is a template parameter.
k | Number of bits of the integer type |
friend class bigunsignedint< k/2 > [friend] |
friend class MPITraits< bigunsignedint< k > > [friend] |
friend struct std::numeric_limits< bigunsignedint< k > > [friend] |
Generated on Fri Apr 29 2011 with Doxygen (ver 1.7.1) [doxygen-log,error-log].