Details
-
Improvement
-
Status: Closed
-
Major
-
Resolution: Fixed
-
3.0
-
None
-
None
Description
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);
}
Attachments
Attachments
Issue Links
- relates to
-
MATH-823 Distribution classes should allow randomData to be configured via constructor or setter
- Closed