Skip to content
Snippets Groups Projects
Commit b85d0b5c authored by Mark OLESEN's avatar Mark OLESEN
Browse files

ENH: provide Rand48 as generator in the expected C++11 form

- this removes an OS-specific dependency (eg, drand48_r is not POSIX)
  and allows easier use of other random number generators.

  The Rand48 generator has identical behaviour and period as the
  lrand48() library routine, but holds its own seed and state
  (which makes it re-entrant) and can be combined with other
  random distributions.

  However, when using the modified form to obtain scalar values
  they will not be identical to what drand48() yields.

  This is because drand48() uses the raw 48-bit values to directly
  set the mantissa of an IEEE double where as the newer distribution
  normalizes based on the 32-bit value.

STYLE: simplify code in Random::shuffle and use Swap
parent e4f5471e
Branches
Tags
No related merge requests found
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment