VR-Vantage 3.1 API Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Types | Public Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes | Static Private Attributes
internal::BigInteger Class Reference

Public Types

typedef uint64_t Type

Public Member Functions

 BigInteger (const BigInteger &rhs)
 BigInteger (uint64_t u)
 BigInteger (const char *decimals, size_t length)
BigIntegeroperator= (const BigInteger &rhs)
BigIntegeroperator= (uint64_t u)
BigIntegeroperator+= (uint64_t u)
BigIntegeroperator*= (uint64_t u)
BigIntegeroperator*= (uint32_t u)
BigIntegeroperator<<= (size_t shift)
bool operator== (const BigInteger &rhs) const
bool operator== (const Type rhs) const
BigIntegerMultiplyPow5 (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

void AppendDecimal64 (const char *begin, const char *end)
void PushBack (Type digit)

Static Private Member Functions

static uint64_t ParseUint64 (const char *begin, const char *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

Member Typedef Documentation

Constructor & Destructor Documentation

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

References count_, and digits_.

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

References digits_.

internal::BigInteger::BigInteger ( const char *  decimals,
size_t  length 
)
inline

Member Function Documentation

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

References count_, and digits_.

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

References count_, and digits_.

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

References count_, digits_, and PushBack().

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

References count_, digits_, MulAdd64(), and PushBack().

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

References count_, digits_, and PushBack().

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

References count_, and digits_.

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

References count_, and digits_.

BigInteger& internal::BigInteger::MultiplyPow5 ( unsigned  exp)
inline
bool internal::BigInteger::Difference ( const BigInteger rhs,
BigInteger out 
) const
inline
int internal::BigInteger::Compare ( const BigInteger rhs) const
inline

References count_, and digits_.

Referenced by internal::CheckWithinHalfULP(), and Difference().

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

References count_.

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

References count_, digits_, and RAPIDJSON_ASSERT.

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

References count_, and digits_.

Referenced by AppendDecimal64(), and operator<<=().

void internal::BigInteger::AppendDecimal64 ( const char *  begin,
const char *  end 
)
inlineprivate

References IsZero(), MultiplyPow5(), and ParseUint64().

Referenced by BigInteger().

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

References count_, digits_, kCapacity, and RAPIDJSON_ASSERT.

Referenced by operator*=(), and operator+=().

static uint64_t internal::BigInteger::ParseUint64 ( const char *  begin,
const char *  end 
)
inlinestaticprivate

References RAPIDJSON_ASSERT.

Referenced by AppendDecimal64().

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

Referenced by operator*=().

Member Data Documentation

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

Referenced by operator<<=(), and PushBack().

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

Referenced by operator<<=().

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

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


Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)