|
dune-common
2.4.1
|
Portable very large unsigned integers. More...
#include <dune/common/bigunsignedint.hh>
Public Types | |
| enum | { bits =std::numeric_limits<std::uint16_t>::digits, n =k/bits+(kbits!=0), hexdigits =4, bitmask =0xFFFF, compbitmask =0xFFFF0000, overflowmask =0x1 } |
Public Member Functions | |
| bigunsignedint () | |
| Construct uninitialized. More... | |
| template<typename Signed > | |
| bigunsignedint (Signed x, typename std::enable_if< std::is_integral< Signed >::value &&std::is_signed< Signed >::value >::type *=0) | |
| Construct from signed int. More... | |
| bigunsignedint (std::uintmax_t x) | |
| Construct from unsigned int. More... | |
| void | print (std::ostream &s) const |
| Print number in hex notation. More... | |
| bigunsignedint< k > | operator+ (const bigunsignedint< k > &x) const |
| add More... | |
| bigunsignedint< k > | operator- (const bigunsignedint< k > &x) const |
| subtract More... | |
| bigunsignedint< k > | operator* (const bigunsignedint< k > &x) const |
| multiply More... | |
| bigunsignedint< k > & | operator++ () |
| prefix increment More... | |
| 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 More... | |
| bigunsignedint< k > | operator^ (const bigunsignedint< k > &x) const |
| bitwise exor More... | |
| bigunsignedint< k > | operator| (const bigunsignedint< k > &x) const |
| bitwise or More... | |
| bigunsignedint< k > | operator~ () const |
| bitwise komplement More... | |
| bigunsignedint< k > | operator<< (int i) const |
| left shift1/ More... | |
| bigunsignedint< k > | operator>> (int i) const |
| right shift More... | |
| bool | operator< (const bigunsignedint< k > &x) const |
| less than More... | |
| bool | operator<= (const bigunsignedint< k > &x) const |
| less than or equal More... | |
| bool | operator> (const bigunsignedint< k > &x) const |
| greater than More... | |
| bool | operator>= (const bigunsignedint< k > &x) const |
| greater or equal More... | |
| bool | operator== (const bigunsignedint< k > &x) const |
| equal More... | |
| bool | operator!= (const bigunsignedint< k > &x) const |
| not equal More... | |
| std::uint_least32_t | touint () const |
| export to other types More... | |
| double | todouble () const |
| Convert to a double. More... | |
Friends | |
| std::size_t | hash_value (const bigunsignedint &arg) |
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 |
1.8.11