CernVM-FS
2.12.0
|
#include <prng.h>
Public Member Functions | |
Prng () throw () | |
void | InitSeed (const uint64_t seed) |
void | InitLocaltime () |
uint32_t | Next (const uint64_t boundary) |
double | NextDouble () |
double | NextNormal () |
Private Attributes | |
uint64_t | state_ |
Static Private Attributes | |
static const uint64_t | a = 6364136223846793005LLU |
static const uint64_t | c = 1442695040888963407LLU |
This file is part of the CernVM File System.
A simple linear congruential pseudo number generator. Thread-safe since there is no global state like with random(). Pseudo Random Number Generator. See: TAoCP, volume 2
|
inline |
Definition at line 39 of file prng.h.
Referenced by NfsMapsSqlite::BusyHandlerInfo::BusyHandlerInfo(), download::DownloadManager::DownloadManager(), signature::SignatureManager::GenerateCertificate(), shash::Digest< 16, kMd5 >::Randomize(), dns::Resolver::Resolver(), and s3fanout::S3FanoutManager::S3FanoutManager().
|
inline |
Definition at line 35 of file prng.h.
Referenced by shash::Digest< 16, kMd5 >::Randomize(), and download::DownloadManager::UpdateProxiesUnlocked().
|
inline |
Returns random number in [0..boundary-1]
Definition at line 49 of file prng.h.
Referenced by NfsMapsSqlite::BusyHandler(), signature::SignatureManager::GenerateCertificate(), shash::Digest< 16, kMd5 >::Randomize(), dns::Resolver::ResolveMany(), Shuffle(), SmallHashDynamic< glue::InodeEx, shash::Md5 >::ShuffleIndices(), and download::DownloadManager::UpdateProxiesUnlocked().
|
inline |
|
inline |