[ 
https://issues.apache.org/jira/browse/RNG-142?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17358497#comment-17358497
 ] 

Gilles Sadowski commented on RNG-142:
-------------------------------------

bq. changes to applied for 2.0

I imagine that actual changes will depend on when they will be performed (e.g. 
if we move to Java 8+ by then).
How about starting with a "wish list" of API calls (?) that the current design 
is unable to provide, and for each, explore
* the current best alternative call
* whether the use-case is worth the change
* alternative designs and their requirements (with pros and cons)

My motivation for the "two-layers" factory of {{RandomSource}} was to prevent 
"internals" becoming part of the public API.  Retrospectively, the "sampling" 
module should have followed a similar layout (enum-based factory).

> 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)

Reply via email to