Skip to content
  • Mark OLESEN's avatar
    ENH: provide Rand48 as generator in the expected C++11 form · b85d0b5c
    Mark OLESEN authored
    - 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
    b85d0b5c