OR-Tools  8.2
MTRandom

Detailed Description

Definition at line 55 of file random.h.

Public Types

typedef int64 difference_type
 
typedef uint64 result_type
 

Public Member Functions

 MTRandom (int32 seed)
 
 MTRandom (const std::string &str_seed)
 
 MTRandom ()
 
uint32 Next ()
 
uint64 Next64 ()
 
uint64 Rand64 ()
 
uint64 operator() ()
 
uint64 operator() (uint64 val_max)
 
uint32 Uniform (uint32 n)
 
void Reset (int32 seed)
 

Static Public Member Functions

static int32 HostnamePidTimeSeed ()
 
static int32 DeterministicSeed ()
 
static constexpr result_type min ()
 
static constexpr result_type max ()
 

Member Typedef Documentation

◆ difference_type

typedef int64 difference_type
inherited

Definition at line 46 of file random.h.

◆ result_type

typedef uint64 result_type
inherited

Definition at line 47 of file random.h.

Constructor & Destructor Documentation

◆ MTRandom() [1/3]

MTRandom ( int32  seed)
inlineexplicit

Definition at line 57 of file random.h.

◆ MTRandom() [2/3]

MTRandom ( const std::string &  str_seed)
inlineexplicit

Definition at line 59 of file random.h.

◆ MTRandom() [3/3]

MTRandom ( )
inline

Definition at line 62 of file random.h.

Member Function Documentation

◆ DeterministicSeed()

int32 DeterministicSeed ( )
staticinherited

Definition at line 92 of file random.cc.

◆ HostnamePidTimeSeed()

int32 HostnamePidTimeSeed ( )
staticinherited

Definition at line 58 of file random.cc.

◆ max()

static constexpr result_type max ( )
inlinestaticconstexprinherited

Definition at line 49 of file random.h.

◆ min()

static constexpr result_type min ( )
inlinestaticconstexprinherited

Definition at line 48 of file random.h.

◆ Next()

uint32 Next ( )
inherited

Definition at line 36 of file random.cc.

◆ Next64()

uint64 Next64 ( )
inherited

Definition at line 42 of file random.cc.

◆ operator()() [1/2]

uint64 operator() ( )
inlineinherited

Definition at line 34 of file random.h.

◆ operator()() [2/2]

uint64 operator() ( uint64  val_max)
inherited

Definition at line 46 of file random.cc.

◆ Rand64()

uint64 Rand64 ( )
inlineinherited

Definition at line 33 of file random.h.

◆ Reset()

void Reset ( int32  seed)
inlineinherited

Definition at line 41 of file random.h.

◆ Uniform()

uint32 Uniform ( uint32  n)
inherited

Definition at line 40 of file random.cc.


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