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 2012/07/20 02:48:34 UTC
[jira] [Resolved] (MATH-764) New sample() API should accept
RandomGenerator as parameter
[ https://issues.apache.org/jira/browse/MATH-764?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Gilles resolved MATH-764.
-------------------------
Resolution: Fixed
Fix Version/s: 3.1
A solution was implemented in revision 1363604.
Please open a new issue if it does not fulfill your needs.
> New sample() API should accept RandomGenerator as parameter
> -----------------------------------------------------------
>
> Key: MATH-764
> URL: https://issues.apache.org/jira/browse/MATH-764
> Project: Commons Math
> Issue Type: Improvement
> Affects Versions: 3.0
> Reporter: Alex Bertram
> Assignee: Gilles
> Fix For: 3.1
>
> Attachments: sampler-refactor.diff
>
> Original Estimate: 48h
> Remaining Estimate: 48h
>
> This may come to late as I know the 3.0 release is nearing completion, but I had some concerns about the new sample() method on the math3 RealDistribution interface.
> Specifically, there doesn't seem to be a way to supply a random generator to the sampler. Perhaps it would be better to have a factory method on the RealDistribution interface that accepted a RandomGenerator and returns an instance of some new interface, Sampler, which contains the sample() methods.
> That is:
> interface RealDistribution {
> Sampler createSampler(RandomGenerator generator);
> Sample createSampler(); // uses default RandomGenerator
> }
> interface Sampler {
> double sample();
> double[] sample(int sampleSize);
> }
--
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