(EGetRandMethod method = eGetRand_LFG);
89TValue GetRand(
void);
95TValue GetRand(TValue
min_value, TValue max_value);
101 Uint8GetRandUint8(
void);
113 size_tGetRandSize_t(
size_t min_value,
size_tmax_value);
119TValue GetRandIndex(TValue
size);
131 size_tGetRandIndexSize_t(
size_t size);
134 staticTValue GetMax(
void);
137EGetRandMethod GetRandMethod(
void)
const;
144 voidRandomize(
void);
148 voidSetSeed(TValue
seed);
152TValue GetSeed(
void)
const;
168 TValuex_GetRand32Bits(
void);
170 TValuex_GetSysRand32Bits(
void)
const;
184eUnexpectedRandMethod,
192 switch(GetErrCode()) {
193 caseeUnavailable :
return "eUnavailable";
194 caseeUnexpectedRandMethod :
return "eUnexpectedRandMethod";
195 caseeSysGeneratorError :
return "eSysGeneratorError";
230 else if(
m_RJ< 0 ) {
262}
while( bits >
r-
size);
269 #if SIZEOF_SIZE_T == 4Exceptions generated by CRandom class.
Include a standard set of the NCBI C++ Toolkit most basic headers.
EErrCode
Error types that an application can generate.
virtual const char * GetErrCodeString(void) const
Get error code interpreted as text.
uint32_t Uint4
4-byte (32-bit) unsigned integer
uint64_t Uint8
8-byte (64-bit) unsigned integer
TValue m_State[kStateSize]
NCBI_EXCEPTION_DEFAULT(CRandomException, CException)
virtual const char * GetErrCodeString(void) const override
Get error code interpreted as text.
Uint4 TValue
Type of the generated integer value and/or the seed value.
EGetRandMethod m_RandMethod
TValue GetRand(void)
Get the next random number in the interval [0..GetMax()] (inclusive)
size_t GetRandIndexSize_t(size_t size)
Get random number in the interval [0..size-1] (e.g.
EGetRandMethod GetRandMethod(void) const
Get the random generator type.
TValue GetRandIndex(TValue size)
Get random number in the interval [0..size-1] (e.g.
Uint8 GetRandUint8(void)
Get random Uint8 number.
Uint8 GetRandIndexUint8(Uint8 size)
Get random number in the interval [0..size-1] (e.g.
EGetRandMethod
Random generator to use in the GetRand() functions.
TValue x_GetRand32Bits(void)
Uint8 x_GetRand64Bits(void)
static TValue GetMax(void)
The max. value GetRand() returns.
size_t GetRandSize_t(size_t min_value, size_t max_value)
Get random number in the interval [min_value..max_value] (inclusive)
CRandom & operator=(const CRandom &)
TValue x_GetSysRand32Bits(void) const
@ eGetRand_LFG
Use lagged Fibonacci (LFG) random number generator.
@ eGetRand_Sys
Use system-dependent random generator.
@ eUnavailable
System-dependent generator is not available.
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
const struct ncbi::grid::netcache::search::fields::SIZE size
double r(size_t dimension_, const Int4 *score_, const double *prob_, double theta_)
NCBI_XUTIL_EXPORT
Parameter to control printing diagnostic message about conversion of static array data from a differe...
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4