[
https://issues.apache.org/jira/browse/RNG-142?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17357916#comment-17357916
]
Alex Herbert commented on RNG-142:
----------------------------------
bq. This compiles (without generating a warning)...
Yes. The same needs to be done for all the distribution samplers and then a
quick check with JApiCmp for compatibility. There may be a few that cannot be
updated easily. It would just require inheriting from the main sampler for the
specialised implementations if they are internal. I think the PoissonSampler is
the only one where the change would not be possible.
> Return type of method "withUniformRandomProvider"
> -------------------------------------------------
>
> Key: RNG-142
> URL: https://issues.apache.org/jira/browse/RNG-142
> Project: Commons RNG
> Issue Type: Improvement
> Components: sampling
> Reporter: Gilles Sadowski
> Priority: Major
>
> Expected usage:
> {code:java}
> NormalizedGaussianSampler n01 =
> ZigguratNormalizedGaussianSampler.of(RandomSource.create(RandomSource.KISS));
> GaussianSampler g =
> GaussianSampler.of(n01.withUniformRandomProvider(RandomSource.create(RandomSource.JSF_64)),
> 0.43, 2.1);
> {code}
> Code doesn't compile: Method {{withUniformRandomProvider}} returns a
> {{SharedStateContinuousSampler}} whereas a {{NormalizedGaussianSampler}} is
> required.
> Am I missing something?
--
This message was sent by Atlassian Jira
(v8.3.4#803005)