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

Phil Steitz commented on MATH-1012:
-----------------------------------

I like the idea here.  This is why we defined RandomGenerator in the first 
place, but this code predates it.  An alternative to RandomUtils might be to 
follow the pattern of JDKRandomGenertor - explicitly subclass SecureRandom and 
implement only the needed methods.  I guess you then still have the factory 
problem to deal with then, so could be you end up having to wrap in any case.  
So I am OK with the RandomUtils setup, but we should call it something else - 
e.g. RandomGeneratorFactory or Random2RandomGenerator.
                
> Reduce code duplication in "RandomDataGenerator"
> ------------------------------------------------
>
>                 Key: MATH-1012
>                 URL: https://issues.apache.org/jira/browse/MATH-1012
>             Project: Commons Math
>          Issue Type: Improvement
>    Affects Versions: 3.2
>            Reporter: Gilles
>            Assignee: Gilles
>            Priority: Trivial
>              Labels: cleanup
>             Fix For: 3.3
>
>         Attachments: MATH-1012.patch
>
>
> Some duplication exists in "o.a.c.m.random.RandomDataGenerator".
> That partly arises from having a method that requires a 
> "o.a.c.m.random.RandomGenerator" parameter vs a similar method but with a 
> "java.security.SecureRandom" parameter.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to