Skip to content

Encapsulate RNG

We need to encapsulate the RNG. It needs to have the following Interface:

  • rndint() -> random integer, could optionally take the upper bound
  • rndflt() -> uniform float from [0, 1)
  • get_max_int() -> query the maximum integer

Other important functionality:

  • rndnumber cache
  • whatever is necessary for restarting.

It should be able to take an RNG that conforms to some interface as template parameter. and should optionally be specializable if somebody wants to include something really fancy.