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

"shuffle" in "MathArrays"

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.0
    • Labels:

      Description

      Method shuffle creates an instance of UniformIntegerDistribution for each entry of the list to be shuffled. Then sample() is called on each instance, which in turn will call nextInt() on the provided RNG.

      The same effect could be achieved more efficiently by calling nextInt(int) directly on the provided RNG, followed by an addition.

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved: