Arcane  4.1.12.0
Developer documentation
Loading...
Searching...
No Matches
internal::BigInteger Class Reference
Collaboration diagram for internal::BigInteger:

Public Types

typedef uint64_t Type

Public Member Functions

 BigInteger (const BigInteger &rhs)
 BigInteger (uint64_t u)
template<typename Ch>
 BigInteger (const Ch *decimals, size_t length)
BigInteger & operator= (const BigInteger &rhs)
BigInteger & operator= (uint64_t u)
BigInteger & operator+= (uint64_t u)
BigInteger & operator*= (uint64_t u)
BigInteger & operator*= (uint32_t u)
BigInteger & operator<<= (size_t shift)
bool operator== (const BigInteger &rhs) const
bool operator== (const Type rhs) const
BigInteger & MultiplyPow5 (unsigned exp)
bool Difference (const BigInteger &rhs, BigInteger *out) const
int Compare (const BigInteger &rhs) const
size_t GetCount () const
Type GetDigit (size_t index) const
bool IsZero () const

Private Member Functions

template<typename Ch>
void AppendDecimal64 (const Ch *begin, const Ch *end)
void PushBack (Type digit)

Static Private Member Functions

template<typename Ch>
static uint64_t ParseUint64 (const Ch *begin, const Ch *end)
static uint64_t MulAdd64 (uint64_t a, uint64_t b, uint64_t k, uint64_t *outHigh)

Private Attributes

Type digits_ [kCapacity]
size_t count_

Static Private Attributes

static const size_t kBitCount = 3328
static const size_t kCapacity = kBitCount / sizeof(Type)
static const size_t kTypeBit = sizeof(Type) * 8

Detailed Description

Definition at line 33 of file biginteger.h.

Member Typedef Documentation

◆ Type

typedef uint64_t internal::BigInteger::Type

Definition at line 35 of file biginteger.h.

Constructor & Destructor Documentation

◆ BigInteger() [1/3]

internal::BigInteger::BigInteger ( const BigInteger & rhs)
inline

Definition at line 37 of file biginteger.h.

◆ BigInteger() [2/3]

internal::BigInteger::BigInteger ( uint64_t u)
inlineexplicit

Definition at line 41 of file biginteger.h.

◆ BigInteger() [3/3]

template<typename Ch>
internal::BigInteger::BigInteger ( const Ch * decimals,
size_t length )
inline

Definition at line 46 of file biginteger.h.

Member Function Documentation

◆ AppendDecimal64()

template<typename Ch>
void internal::BigInteger::AppendDecimal64 ( const Ch * begin,
const Ch * end )
inlineprivate

Definition at line 231 of file biginteger.h.

◆ Compare()

int internal::BigInteger::Compare ( const BigInteger & rhs) const
inline

Definition at line 214 of file biginteger.h.

◆ Difference()

bool internal::BigInteger::Difference ( const BigInteger & rhs,
BigInteger * out ) const
inline

Definition at line 192 of file biginteger.h.

◆ GetCount()

size_t internal::BigInteger::GetCount ( ) const
inline

Definition at line 225 of file biginteger.h.

◆ GetDigit()

Type internal::BigInteger::GetDigit ( size_t index) const
inline

Definition at line 226 of file biginteger.h.

◆ IsZero()

bool internal::BigInteger::IsZero ( ) const
inline

Definition at line 227 of file biginteger.h.

◆ MulAdd64()

uint64_t internal::BigInteger::MulAdd64 ( uint64_t a,
uint64_t b,
uint64_t k,
uint64_t * outHigh )
inlinestaticprivate

Definition at line 257 of file biginteger.h.

◆ MultiplyPow5()

BigInteger & internal::BigInteger::MultiplyPow5 ( unsigned exp)
inline

Definition at line 168 of file biginteger.h.

◆ operator*=() [1/2]

BigInteger & internal::BigInteger::operator*= ( uint32_t u)
inline

Definition at line 111 of file biginteger.h.

◆ operator*=() [2/2]

BigInteger & internal::BigInteger::operator*= ( uint64_t u)
inline

Definition at line 93 of file biginteger.h.

◆ operator+=()

BigInteger & internal::BigInteger::operator+= ( uint64_t u)
inline

Definition at line 76 of file biginteger.h.

◆ operator<<=()

BigInteger & internal::BigInteger::operator<<= ( size_t shift)
inline

Definition at line 134 of file biginteger.h.

◆ operator=() [1/2]

BigInteger & internal::BigInteger::operator= ( const BigInteger & rhs)
inline

Definition at line 61 of file biginteger.h.

◆ operator=() [2/2]

BigInteger & internal::BigInteger::operator= ( uint64_t u)
inline

Definition at line 70 of file biginteger.h.

◆ operator==() [1/2]

bool internal::BigInteger::operator== ( const BigInteger & rhs) const
inline

Definition at line 160 of file biginteger.h.

◆ operator==() [2/2]

bool internal::BigInteger::operator== ( const Type rhs) const
inline

Definition at line 164 of file biginteger.h.

◆ ParseUint64()

template<typename Ch>
uint64_t internal::BigInteger::ParseUint64 ( const Ch * begin,
const Ch * end )
inlinestaticprivate

Definition at line 247 of file biginteger.h.

◆ PushBack()

void internal::BigInteger::PushBack ( Type digit)
inlineprivate

Definition at line 241 of file biginteger.h.

Member Data Documentation

◆ count_

size_t internal::BigInteger::count_
private

Definition at line 292 of file biginteger.h.

◆ digits_

Type internal::BigInteger::digits_[kCapacity]
private

Definition at line 291 of file biginteger.h.

◆ kBitCount

const size_t internal::BigInteger::kBitCount = 3328
staticprivate

Definition at line 287 of file biginteger.h.

◆ kCapacity

const size_t internal::BigInteger::kCapacity = kBitCount / sizeof(Type)
staticprivate

Definition at line 288 of file biginteger.h.

◆ kTypeBit

const size_t internal::BigInteger::kTypeBit = sizeof(Type) * 8
staticprivate

Definition at line 289 of file biginteger.h.


The documentation for this class was generated from the following file: