Dash Core Source Documentation (0.16.0.1)
Find detailed information regarding the Dash Core source code.
Template base class for unsigned big integers. More...
#include <arith_uint256.h>
Public Member Functions | |
base_uint () | |
base_uint (const base_uint &b) | |
base_uint & | operator= (const base_uint &b) |
base_uint (uint64_t b) | |
base_uint (const std::string &str) | |
bool | operator! () const |
const base_uint | operator~ () const |
const base_uint | operator- () const |
double | getdouble () const |
base_uint & | operator= (uint64_t b) |
base_uint & | operator^= (const base_uint &b) |
base_uint & | operator &= (const base_uint &b) |
base_uint & | operator|= (const base_uint &b) |
base_uint & | operator^= (uint64_t b) |
base_uint & | operator|= (uint64_t b) |
base_uint & | operator<<= (unsigned int shift) |
base_uint & | operator>>= (unsigned int shift) |
base_uint & | operator+= (const base_uint &b) |
base_uint & | operator-= (const base_uint &b) |
base_uint & | operator+= (uint64_t b64) |
base_uint & | operator-= (uint64_t b64) |
base_uint & | operator*= (uint32_t b32) |
base_uint & | operator*= (const base_uint &b) |
base_uint & | operator/= (const base_uint &b) |
base_uint & | operator++ () |
const base_uint | operator++ (int) |
base_uint & | operator-- () |
const base_uint | operator-- (int) |
int | CompareTo (const base_uint &b) const |
bool | EqualTo (uint64_t b) const |
std::string | GetHex () const |
void | SetHex (const char *psz) |
void | SetHex (const std::string &str) |
std::string | ToString () const |
unsigned int | size () const |
unsigned int | bits () const |
Returns the position of the highest bit set plus one, or zero if the value is zero. More... | |
uint64_t | GetLow64 () const |
Protected Attributes | |
uint32_t | pn [WIDTH] |
Static Protected Attributes | |
static constexpr int | WIDTH = BITS / 32 |
Friends | |
const base_uint | operator+ (const base_uint &a, const base_uint &b) |
const base_uint | operator- (const base_uint &a, const base_uint &b) |
const base_uint | operator* (const base_uint &a, const base_uint &b) |
const base_uint | operator/ (const base_uint &a, const base_uint &b) |
const base_uint | operator| (const base_uint &a, const base_uint &b) |
const base_uint | operator & (const base_uint &a, const base_uint &b) |
const base_uint | operator^ (const base_uint &a, const base_uint &b) |
const base_uint | operator>> (const base_uint &a, int shift) |
const base_uint | operator<< (const base_uint &a, int shift) |
const base_uint | operator* (const base_uint &a, uint32_t b) |
bool | operator== (const base_uint &a, const base_uint &b) |
bool | operator!= (const base_uint &a, const base_uint &b) |
bool | operator> (const base_uint &a, const base_uint &b) |
bool | operator< (const base_uint &a, const base_uint &b) |
bool | operator>= (const base_uint &a, const base_uint &b) |
bool | operator<= (const base_uint &a, const base_uint &b) |
bool | operator== (const base_uint &a, uint64_t b) |
bool | operator!= (const base_uint &a, uint64_t b) |
Detailed Description
template<unsigned int BITS>
class base_uint< BITS >
Template base class for unsigned big integers.
Definition at line 25 of file arith_uint256.h.
Constructor & Destructor Documentation
◆ base_uint() [1/4]
Definition at line 32 of file arith_uint256.h.
◆ base_uint() [2/4]
Definition at line 40 of file arith_uint256.h.
◆ base_uint() [3/4]
Definition at line 55 of file arith_uint256.h.
◆ base_uint() [4/4]
Definition at line 16 of file arith_uint256.cpp.
Member Function Documentation
◆ bits()
unsigned int base_uint< BITS >::bits | ( | ) | const |
Returns the position of the highest bit set plus one, or zero if the value is zero.
Definition at line 174 of file arith_uint256.cpp.
Referenced by GetBlockProofEquivalentTime(), and base_uint< 256 >::operator/=().
◆ CompareTo()
Definition at line 112 of file arith_uint256.cpp.
◆ EqualTo()
bool base_uint< BITS >::EqualTo | ( | uint64_t | b | ) | const |
Definition at line 124 of file arith_uint256.cpp.
◆ getdouble()
double base_uint< BITS >::getdouble | ( | ) | const |
Definition at line 138 of file arith_uint256.cpp.
Referenced by GetNetworkHashPS(), InvalidChainFound(), and UpdateTip().
◆ GetHex()
std::string base_uint< BITS >::GetHex | ( | ) | const |
Definition at line 150 of file arith_uint256.cpp.
Referenced by AppInitParameterInteraction(), blockheaderToJSON(), blockToJSON(), getblockchaininfo(), and getblocktemplate().
◆ GetLow64()
|
inline |
Definition at line 251 of file arith_uint256.h.
Referenced by GetBlockProofEquivalentTime(), and arith_uint256::GetCompact().
◆ operator &=()
|
inline |
Definition at line 110 of file arith_uint256.h.
◆ operator!()
|
inline |
Definition at line 67 of file arith_uint256.h.
◆ operator*=() [1/2]
Definition at line 58 of file arith_uint256.cpp.
◆ operator*=() [2/2]
base_uint< BITS > & base_uint< BITS >::operator*= | ( | const base_uint< BITS > & | b | ) |
Definition at line 70 of file arith_uint256.cpp.
◆ operator++() [1/2]
Definition at line 179 of file arith_uint256.h.
◆ operator++() [2/2]
Definition at line 188 of file arith_uint256.h.
◆ operator+=() [1/2]
|
inline |
Definition at line 141 of file arith_uint256.h.
◆ operator+=() [2/2]
Definition at line 159 of file arith_uint256.h.
◆ operator-()
Definition at line 83 of file arith_uint256.h.
◆ operator--() [1/2]
Definition at line 196 of file arith_uint256.h.
◆ operator--() [2/2]
Definition at line 205 of file arith_uint256.h.
◆ operator-=() [1/2]
|
inline |
Definition at line 153 of file arith_uint256.h.
◆ operator-=() [2/2]
Definition at line 167 of file arith_uint256.h.
◆ operator/=()
base_uint< BITS > & base_uint< BITS >::operator/= | ( | const base_uint< BITS > & | b | ) |
Definition at line 86 of file arith_uint256.cpp.
◆ operator<<=()
base_uint< BITS > & base_uint< BITS >::operator<<= | ( | unsigned int | shift | ) |
Definition at line 24 of file arith_uint256.cpp.
◆ operator=() [1/2]
|
inline |
Definition at line 48 of file arith_uint256.h.
◆ operator=() [2/2]
Definition at line 94 of file arith_uint256.h.
◆ operator>>=()
base_uint< BITS > & base_uint< BITS >::operator>>= | ( | unsigned int | shift | ) |
Definition at line 41 of file arith_uint256.cpp.
◆ operator^=() [1/2]
|
inline |
Definition at line 103 of file arith_uint256.h.
◆ operator^=() [2/2]
Definition at line 124 of file arith_uint256.h.
◆ operator|=() [1/2]
|
inline |
Definition at line 117 of file arith_uint256.h.
◆ operator|=() [2/2]
Definition at line 131 of file arith_uint256.h.
◆ operator~()
Definition at line 75 of file arith_uint256.h.
◆ SetHex() [1/2]
void base_uint< BITS >::SetHex | ( | const char * | psz | ) |
Definition at line 156 of file arith_uint256.cpp.
◆ SetHex() [2/2]
void base_uint< BITS >::SetHex | ( | const std::string & | str | ) |
Definition at line 162 of file arith_uint256.cpp.
◆ size()
|
inline |
Definition at line 240 of file arith_uint256.h.
◆ ToString()
std::string base_uint< BITS >::ToString | ( | ) | const |
Definition at line 168 of file arith_uint256.cpp.
Friends And Related Function Documentation
◆ operator &
|
friend |
Definition at line 221 of file arith_uint256.h.
◆ operator!= [1/2]
|
friend |
Definition at line 227 of file arith_uint256.h.
◆ operator!= [2/2]
Definition at line 233 of file arith_uint256.h.
◆ operator* [1/2]
|
friend |
Definition at line 218 of file arith_uint256.h.
◆ operator* [2/2]
|
friend |
Definition at line 225 of file arith_uint256.h.
◆ operator+
|
friend |
Definition at line 216 of file arith_uint256.h.
◆ operator-
|
friend |
Definition at line 217 of file arith_uint256.h.
◆ operator/
|
friend |
Definition at line 219 of file arith_uint256.h.
◆ operator<
|
friend |
Definition at line 229 of file arith_uint256.h.
◆ operator<<
|
friend |
Definition at line 224 of file arith_uint256.h.
◆ operator<=
|
friend |
Definition at line 231 of file arith_uint256.h.
◆ operator== [1/2]
|
friend |
Definition at line 226 of file arith_uint256.h.
◆ operator== [2/2]
|
friend |
Definition at line 232 of file arith_uint256.h.
◆ operator>
|
friend |
Definition at line 228 of file arith_uint256.h.
◆ operator>=
|
friend |
Definition at line 230 of file arith_uint256.h.
◆ operator>>
|
friend |
Definition at line 223 of file arith_uint256.h.
◆ operator^
|
friend |
Definition at line 222 of file arith_uint256.h.
◆ operator|
|
friend |
Definition at line 220 of file arith_uint256.h.
Member Data Documentation
◆ pn
Definition at line 29 of file arith_uint256.h.
Referenced by ArithToUint256(), base_uint< 256 >::base_uint(), base_uint< 256 >::CompareTo(), base_uint< 256 >::GetLow64(), base_uint< 256 >::operator!(), base_uint< 256 >::operator&=(), base_uint< 256 >::operator*=(), base_uint< 256 >::operator++(), base_uint< 256 >::operator+=(), base_uint< 256 >::operator-(), base_uint< 256 >::operator--(), base_uint< 256 >::operator<<=(), base_uint< 256 >::operator=(), base_uint< 256 >::operator>>=(), base_uint< 256 >::operator^=(), base_uint< 256 >::operator|=(), base_uint< 256 >::operator~(), base_uint< 256 >::size(), and UintToArith256().
◆ WIDTH
|
staticprotected |
Definition at line 28 of file arith_uint256.h.
Referenced by ArithToUint256(), base_uint< 256 >::base_uint(), base_uint< 256 >::GetLow64(), base_uint< 256 >::operator!(), base_uint< 256 >::operator&=(), base_uint< 256 >::operator++(), base_uint< 256 >::operator+=(), base_uint< 256 >::operator-(), base_uint< 256 >::operator--(), base_uint< 256 >::operator=(), base_uint< 256 >::operator^=(), base_uint< 256 >::operator|=(), base_uint< 256 >::operator~(), and UintToArith256().
The documentation for this class was generated from the following files:
- src/arith_uint256.h
- src/arith_uint256.cpp