V8 API Reference, 7.2.502.16 (for Deno 0.2.4)
v8::base::RandomNumberGenerator Class Referencefinal

Public Types

typedef bool(* EntropySource) (unsigned char *buffer, size_t buflen)
 

Public Member Functions

 RandomNumberGenerator (int64_t seed)
 
V8_INLINE int NextInt () V8_WARN_UNUSED_RESULT
 
int NextInt (int max) V8_WARN_UNUSED_RESULT
 
V8_INLINE bool NextBool () V8_WARN_UNUSED_RESULT
 
double NextDouble () V8_WARN_UNUSED_RESULT
 
int64_t NextInt64 () V8_WARN_UNUSED_RESULT
 
void NextBytes (void *buffer, size_t buflen)
 
std::vector< uint64_t > NextSample (uint64_t max, size_t n) V8_WARN_UNUSED_RESULT
 
std::vector< uint64_t > NextSampleSlow (uint64_t max, size_t n, const std::unordered_set< uint64_t > &excluded=std::unordered_set< uint64_t >{}) V8_WARN_UNUSED_RESULT
 
void SetSeed (int64_t seed)
 
int64_t initial_seed () const
 

Static Public Member Functions

static void SetEntropySource (EntropySource entropy_source)
 
static double ToDouble (uint64_t state0)
 
static void XorShift128 (uint64_t *state0, uint64_t *state1)
 
static uint64_t MurmurHash3 (uint64_t)
 

Detailed Description

Definition at line 38 of file random-number-generator.h.


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