Library of Assembled Shared Sources
lass::num::RandomParkMiller Class Reference

Minimal Standard generator by Park and Miller. More...

#include <random.h>

Public Types

using result_type = num::Tuint32
 type of return value.
 
typedef num::Tuint32 TValue
 type of return value.
 

Public Member Functions

 RandomParkMiller ()
 default constructor.
 
 RandomParkMiller (result_type seed)
 default constructor.
 
result_type operator() ()
 draw a random number
 
result_type operator() (result_type supremum)
 draw a random number remapped to range [0, supremum)
 

Static Public Member Functions

static constexpr result_type min ()
 minimum return value.
 
static constexpr result_type max ()
 maximum return value.
 

Detailed Description

Minimal Standard generator by Park and Miller.

RandomParkMiller is the LASS implementation of the Minimal Standard generator by Park and Miller

Park and Miller, "Random Number Generators: Good ones are hard to find", Communications of the ACM, October 1988, Volume 31, No 10, pages 1192-1201.

Definition at line 99 of file random.h.

Member Typedef Documentation

◆ TValue

type of return value.

Deprecated

Definition at line 105 of file random.h.

Constructor & Destructor Documentation

◆ RandomParkMiller() [1/2]

lass::num::RandomParkMiller::RandomParkMiller ( )

default constructor.

will seed with default value

Definition at line 64 of file random.cpp.

◆ RandomParkMiller() [2/2]

lass::num::RandomParkMiller::RandomParkMiller ( result_type seed)
explicit

default constructor.

will seed with default value

Definition at line 74 of file random.cpp.

Member Function Documentation

◆ operator()()

RandomParkMiller::TValue lass::num::RandomParkMiller::operator() ( result_type supremum)
inline

draw a random number remapped to range [0, supremum)

Deprecated
this is A VERY BAD WAY TO DO IT!

Definition at line 106 of file random.inl.


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