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

Create a base class for all RNGs

Rank to TopRank to BottomAttach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskConvert to sub-taskLinkCloneLabelsUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Minor
    • Resolution: Won't Fix
    • Affects Version/s: None
    • Fix Version/s: None
    • Labels:

      Description

      I proposed to create a base class which the existing abstract classes AbstractRandomGenerator and BitsStreamGenerator will extend.

      This would allow to define nextBytes(byte[]) at the base class level.

      The code for that method is almost identical in the two hierarchies: they only differ in a call to either nextInt() or next(32) respectively; the latter is however the same as the former, in disguise, and is not subject to change given the type of return value.

      As a corollary, the new base class can be the unique place where to add utilities such as the one proposed in MATH-1306.

      Update: AbstractRandomGenerator and BitsStreamGenerator are both obsoleted by the class proposed in this report.

        Attachments

        Issue Links

          Activity

          $i18n.getText('security.level.explanation', $currentSelection) Viewable by All Users
          Cancel

            People

            • Assignee:
              erans Gilles Sadowski
              Reporter:
              erans Gilles Sadowski

              Dates

              • Created:
                Updated:
                Resolved:

                Issue deployment