Uploaded image for project: 'Commons RNG'
  1. Commons RNG
  2. RNG-20

Initial state diversity

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Implemented
    • None
    • 1.0
    • core
    • None

    Description

      A generator usually assumes that its initial state is "sufficiently diverse" for it to perform correctly.
      For example, it is known that some algorithms (e.g. "Mersenne Twister") will be "stuck" by the all-zero state.

      To ensure diversity when the seed (passed by the user) contains less information than the state can hold, SeedFactory provides a fillState method to be called from within the setSeedInternal method of an RNG implementation.

      In this ticket, it is proposed that the actual code (for replacing zeroes in the initial state) is inspired from the one that already existed in class AbstractWell.

      Note: neither the code in AbstractWell nor another code, in MersenneTwister and MersenneTwister64 (with a similar purpose), will be replaced by a call to fillState because for those algorithms, the filling procedure is part of the reference code (and is thus necessary in order to reproduce the exact same output).

      Attachments

        Activity

          People

            erans Gilles Sadowski
            erans Gilles Sadowski
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: