You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Gilles (JIRA)" <ji...@apache.org> on 2016/03/13 02:38:33 UTC

[jira] [Created] (MATH-1339) "shuffle" in "MathArrays"

Gilles created MATH-1339:
----------------------------

             Summary: "shuffle" in "MathArrays"
                 Key: MATH-1339
                 URL: https://issues.apache.org/jira/browse/MATH-1339
             Project: Commons Math
          Issue Type: Improvement
            Reporter: Gilles
            Assignee: Gilles
            Priority: Minor
             Fix For: 4.0


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.




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)