|
|
void | Add (const BigInt &Other) |
| | Adds two integers.
|
| |
|
void | BitwiseAnd (const BigInt &Other) |
| | Bitwise 'and'
|
| |
|
void | BitwiseNot () |
| | Bitwise 'not'
|
| |
|
void | BitwiseOr (const BigInt &Other) |
| | Bitwise 'or'
|
| |
|
void | Divide (const BigInt &Divisor) |
| | Divides two integers.
|
| |
|
void | DivideWithRemainder (const BigInt &Divisor, BigInt &Remainder) |
| | Divides two integers with remainder.
|
| |
|
int32 | GetBit (int32 BitIndex) const |
| | Returns a bit value as an integer value (0 or 1).
|
| |
| int32 | GetHighestNonZeroBit () const |
| | Returns the index of the highest non-zero bit. 更多...
|
| |
| int32 | GetHighestNonZeroWord () const |
| | Returns the index of the highest word that is not zero. 更多...
|
| |
|
bool | IsEqual (const BigInt &Other) const |
| | Checks if two integers are equal.
|
| |
|
bool | IsGreater (const BigInt &Other) const |
| | this > Other
|
| |
|
bool | IsGreaterOrEqual (const BigInt &Other) const |
| | this >= Other
|
| |
|
bool | IsGreaterThanZero () const |
| | this > 0
|
| |
|
bool | IsLess (const BigInt &Other) const |
| | this < Other
|
| |
|
bool | IsLessOrEqual (const BigInt &Other) const |
| | this <= Other
|
| |
|
bool | IsLessThanZero () const |
| | this < 0
|
| |
|
bool | IsNegative () const |
| | Checks if this integer is negative.
|
| |
|
bool | IsZero () const |
| | this == 0
|
| |
|
void | Modulo (const BigInt &Modulus) |
| | Performs modulo operation on this integer.
|
| |
|
void | Multiply (const BigInt &Factor) |
| | Multiplies two integers.
|
| |
|
void | MultiplyFast (const BigInt &Factor) |
| | Multiplies two positive integers.
|
| |
| void | Negate () |
| | Negates this integer. 更多...
|
| |
|
TBigInt & | operator= (int64 Other) |
| | Assignment operator for int64 values.
|
| |
|
bool | operator[] (int32 BitIndex) const |
| | Bit indexing operator
|
| |
|
void | Parse (const FString &Value) |
| | Parses a string representing a hex value
|
| |
| FORCEINLINE void | Set (int64 Value) |
| | Initializes this big int with a 64 bit integer value. 更多...
|
| |
|
void | SetBit (int32 BitIndex, int32 Value) |
| | Sets a bit value.
|
| |
| void | ShiftLeft (const int32 BitCount) |
| | Shift left by the specified amount of bits. 更多...
|
| |
|
void | ShiftLeftByOneInternal () |
| | Shift left by 1 bit.
|
| |
| void | ShiftLeftInternal (const int32 BitCount) |
| | Shift left by the specified amount of bits. 更多...
|
| |
| void | ShiftRight (const int32 BitCount) |
| | Shift right by the specified amount of bits. 更多...
|
| |
|
void | ShiftRightByOneInternal () |
| | Shift right by 1 bit.
|
| |
| void | ShiftRightInternal (const int32 BitCount) |
| | Shift right by the specified amount of bits. 更多...
|
| |
|
int32 | Sign () const |
| | Returns the sign of this integer.
|
| |
|
void | Sqrt () |
| | Calculates square root of this integer.
|
| |
|
void | Subtract (const BigInt &Other) |
| | Subtracts two integers.
|
| |
| | TBigInt () |
| | Default constructor. 更多...
|
| |
| | TBigInt (const FString &Value) |
| | Constructor. 更多...
|
| |
| | TBigInt (const uint32 *InBits) |
| | Constructor. 更多...
|
| |
| | TBigInt (const uint8 *InData, uint32 InNumBytes) |
| | Constructor. 更多...
|
| |
| | TBigInt (int64 Other) |
| | Constructor. 更多...
|
| |
| int64 | ToInt () const |
| | Returns the value of this big int as a 64-bit integer. 更多...
|
| |
|
FString | ToString () const |
| | Returns this big int as a string.
|
| |
|
FORCEINLINE void | Zero () |
| | Sets this integer to 0.
|
| |
template<int32 NumBits, bool bSigned = true>
class TBigInt< NumBits, bSigned >
n-bit integer.
- 待办事项:
- : optimize Data is stored as an array of 32-bit words from the least to the most significant Doesn't handle overflows (not a big issue, we can always use a bigger bit count) Minimum sanity checks. Can convert from int64 and back (by truncating the result, this is mostly for testing)