Uploaded image for project: 'Commons Math'
  1. Commons Math
  2. MATH-701

Seeding a default RNG

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 3.0
    • None
    • None

    Description

      In "RandomDataImpl":

      private RandomGenerator getRan() {
          if (rand == null) {
              rand = new JDKRandomGenerator();
              rand.setSeed(System.currentTimeMillis());
          }
          return rand;
      }
      

      The conditional branch is used by "sample()" in "AbstractContinuousDistribution".

      When several "...Distribution" objects are instantiated in a short time interval, they are seeded with the same value.

      Attachments

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: