CDynInt< T, sz >模板类参考
详细描述
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
在文件DynInt.h第36行定义。
所有成员的列表。
公有成员 |
| 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 |
构造及析构函数文档
default constructor
creates a DynInt that is all zero.
在文件DynInt.h第43行定义。
constructor (set least significant ``word'')
The least significant word is set, the rest filled with zeros.
- 参数:
-
在文件DynInt.h第55行定义。
constructor (set least significant ``word'')
The least significant word is set, the rest filled with zeros.
- 参数:
-
在文件DynInt.h第68行定义。
constructor (set least significant ``word'')
The least significant word is set, the rest filled with zeros.
- 参数:
-
在文件DynInt.h第81行定义。
constructor (set least significant ``word'')
The least significant word is set, the rest filled with zeros.
- 参数:
-
在文件DynInt.h第94行定义。
constructor (set least significant ``word'')
The least significant word is set, the rest filled with zeros.
- 参数:
-
在文件DynInt.h第107行定义。
constructor (set least significant ``word'')
The least significant word is set, the rest filled with zeros.
- 参数:
-
在文件DynInt.h第120行定义。
constructor (set whole array)
Initialize the DynInt based on an array, which is passed as an argument.
- 参数:
-
在文件DynInt.h第133行定义。
成员函数文档
cast to least significant word *dangerous*
在文件DynInt.h第511行定义。
bool operator!= |
( |
const CDynInt< T, sz > & |
x |
) |
const |
overload ! operator; test if current object is not equal to x
- 参数:
-
在文件DynInt.h第426行定义。
overload & operator and return x & y
- 参数:
-
在文件DynInt.h第179行定义。
overload &= operator
perform bitwise and with current DynInt and x
- 参数:
-
在文件DynInt.h第456行定义。
overload * operator and return x * y
- 参数:
-
在文件DynInt.h第302行定义。
overload *= operator; multiple x to with current DynInt
- 参数:
-
在文件DynInt.h第329行定义。
overload + operator and return x + y
- 参数:
-
在文件DynInt.h第263行定义。
overload += operator; add x to current DynInt
- 参数:
-
在文件DynInt.h第311行定义。
overload - operator and return x - y
- 参数:
-
在文件DynInt.h第284行定义。
overload -= operator; substract x from current DynInt
- 参数:
-
在文件DynInt.h第320行定义。
overload / operator and return x / y
- 参数:
-
在文件DynInt.h第293行定义。
overload /= operator; divide current object by x
- 参数:
-
在文件DynInt.h第338行定义。
bool operator< |
( |
const CDynInt< T, sz > & |
x |
) |
const |
overload < operator; test if current object is smaller than x
- 参数:
-
在文件DynInt.h第410行定义。
CDynInt<T,sz> operator<< |
( |
int |
shift |
) |
|
overload << operator
perform bit shift to the left
- 参数:
-
| shift | shift by this amount |
在文件DynInt.h第195行定义。
CDynInt<T,sz>& operator<<= |
( |
int |
shift |
) |
|
overload <<= operator
perform bit shift to the left
- 参数:
-
| shift | shift by this amount |
在文件DynInt.h第484行定义。
bool operator<= |
( |
const CDynInt< T, sz > & |
x |
) |
const |
overload <= operator; test if current object lower equal x
- 参数:
-
在文件DynInt.h第378行定义。
bool operator== |
( |
const CDynInt< T, sz > & |
x |
) |
const |
overload == operator; test if current object equals x
- 参数:
-
在文件DynInt.h第347行定义。
bool operator> |
( |
const CDynInt< T, sz > & |
x |
) |
const |
overload > operator; test if current object is bigger than x
- 参数:
-
在文件DynInt.h第394行定义。
bool operator>= |
( |
const CDynInt< T, sz > & |
x |
) |
const |
overload >= operator; test if current object greater equal x
- 参数:
-
在文件DynInt.h第362行定义。
CDynInt<T,sz> operator>> |
( |
int |
shift |
) |
|
overload >> operator
perform bit shift to the right
- 参数:
-
| shift | shift by this amount |
在文件DynInt.h第223行定义。
CDynInt<T,sz>& operator>>= |
( |
int |
shift |
) |
|
overload >>= operator
perform bit shift to the right
- 参数:
-
| shift | shift by this amount |
在文件DynInt.h第496行定义。
overload ^ operator and return x ^ y
- 参数:
-
在文件DynInt.h第249行定义。
overload ^= operator
perform bitwise xor with current DynInt and x
- 参数:
-
在文件DynInt.h第470行定义。
overload | operator and return x | y
- 参数:
-
在文件DynInt.h第165行定义。
overload |= operator
perform bitwise or with current DynInt and x
- 参数:
-
在文件DynInt.h第442行定义。
void print_bits |
( |
|
) |
const |
print the current long integer in bits (without carriage return
在文件DynInt.h第551行定义。
print the current long integer in hex (without carriage return
在文件DynInt.h第544行定义。
该类的文档由以下文件生成: