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

Seeding a default RNG

Rank to TopRank to BottomBulk Copy AttachmentsBulk Move AttachmentsVotersWatch issueWatchersConvert to sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    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

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

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

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment