File random.hpp

class RNG
#include <random.hpp>

Implements a fast random number generator using 32 bit XOR shifts (for details, see http://www.jstatsoft.org/v08/i14/paper).

Public Functions

RNG(uint32 randomState)
Parameters:

randomState – The seed to be used by the random number generator

uint32 random(uint32 min, uint32 max)

Generates and returns a random number in [min, max).

Parameters:
  • min – The minimum number (inclusive)

  • max – The maximum number (exclusive)

Returns:

The random number that has been generated

Private Members

uint32 randomState_