template<class T, int sz>
class shogun::CDynInt< T, sz >
integer type of dynamic size
This object can be used to create huge integers. These integers can be used directly instead of the usual int32_t etc types since operators are properly overloaded.
An exampe use would be 512 wide unsigned ints consisting of four uint64's:
CDynInt<uint64_t, 4> int512;
This data type is mostly used as a (efficient) storage container for bit-mapped strings. Therefore, currently only comparison, assignment and bit operations are implemented.
TODO: implement add,mul,div
Definition at line 38 of file DynInt.h.
|
| CDynInt () |
|
| CDynInt (uint8_t x) |
|
| CDynInt (uint16_t x) |
|
| CDynInt (uint32_t x) |
|
| CDynInt (int32_t x) |
|
| CDynInt (int64_t x) |
|
| CDynInt (uint64_t x) |
|
| CDynInt (const T x[sz]) |
|
| CDynInt (const CDynInt< T, sz > &x) |
|
| ~CDynInt () |
|
CDynInt< T, sz > & | operator= (const CDynInt< T, sz > &x) |
|
const CDynInt< T, sz > | operator| (const CDynInt< T, sz > &x) const |
|
const CDynInt< T, sz > | operator& (const CDynInt< T, sz > &x) const |
|
CDynInt< T, sz > | operator<< (int shift) |
|
CDynInt< T, sz > | operator>> (int shift) |
|
const CDynInt< T, sz > | operator^ (const CDynInt< T, sz > &x) const |
|
const CDynInt< T, sz > | operator+ (const CDynInt< T, sz > &x) const |
|
const CDynInt< T, sz > | operator- (const CDynInt< T, sz > &x) const |
|
const CDynInt< T, sz > | operator/ (const CDynInt< T, sz > &x) const |
|
const CDynInt< T, sz > | operator* (const CDynInt< T, sz > &x) const |
|
CDynInt< T, sz > & | operator+= (const CDynInt< T, sz > &x) |
|
CDynInt< T, sz > & | operator-= (const CDynInt< T, sz > &x) |
|
CDynInt< T, sz > & | operator*= (const CDynInt< T, sz > &x) |
|
CDynInt< T, sz > & | operator/= (const CDynInt< T, sz > &x) |
|
bool | operator== (const CDynInt< T, sz > &x) const |
|
bool | operator>= (const CDynInt< T, sz > &x) const |
|
bool | operator<= (const CDynInt< T, sz > &x) const |
|
bool | operator> (const CDynInt< T, sz > &x) const |
|
bool | operator< (const CDynInt< T, sz > &x) const |
|
bool | operator!= (const CDynInt< T, sz > &x) const |
|
CDynInt< T, sz > & | operator|= (const CDynInt< T, sz > &x) |
|
CDynInt< T, sz > & | operator&= (const CDynInt< T, sz > &x) |
|
CDynInt< T, sz > & | operator^= (const CDynInt< T, sz > &x) |
|
CDynInt< T, sz > & | operator<<= (int shift) |
|
CDynInt< T, sz > & | operator>>= (int shift) |
|
CDynInt< T, sz > & | operator~ () |
|
| operator T () |
|
CDynInt< T, sz > & | operator-- () |
|
CDynInt< T, sz > & | operator++ () |
|
void | print_hex () const |
|
void | print_bits () const |
|