[
https://issues.apache.org/jira/browse/MATH-834?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13427680#comment-13427680
]
Gilles commented on MATH-834:
-----------------------------
Changes done in revision 1368738.
I tried to replace line 349 in "NaturalRanking.java" (package
"o.a.c.m.stat.ranking"):
{code}
randomData.nextLong(f, f + length - 1);
{code}
with supposedly equivalent statements using "UniformRealDistribution" but a
test failed.
I think that it may be due to the fact that in "sample" from
"UniformRealDistribution", the upper bound is never returned, while in
"nextLong" from "RandomDataImpl", the upper bound is included.
Can someone confirm?
> Replace calls to the various sampling methods in "RandomDataImpl"
> -----------------------------------------------------------------
>
> Key: MATH-834
> URL: https://issues.apache.org/jira/browse/MATH-834
> Project: Commons Math
> Issue Type: Task
> Reporter: Gilles
> Assignee: Gilles
> Priority: Minor
> Fix For: 3.1
>
>
> Following MATH-764 and MATH-823, the "authoritative" code that implements
> sampling from distributions is located in the class that represents a
> specific distribution (in package "o.a.c.m.distribution").
> Hence, all CM code that performs sampling from a distribution should call the
> "sample" method from the corresponding distribution, instead of one of the
> methods defined in "RandomDataImpl" (in package "o.a.c.m.random").
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira