On 4/5/13 3:58 AM, Gilles (JIRA) wrote:
>     [ 
> https://issues.apache.org/jira/browse/MATH-963?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13623532#comment-13623532
>  ] 
>
> Gilles commented on MATH-963:
> -----------------------------
>
> bq. [...] good default impl to be added to AbstractRandomGenerator. "Good" 
> means similar to what [...]BitstreamGenerator does.
>
> What about using the same? :)

Look at the impl.  It makes use of the setup in the
BitStreamGenerator.  The Jdk generator, for example, does not have
the ability to generate raw bits - just bytes.  You would have to
accomplish the same thing using nextBytes.  There were some bugs in
the initial impls of this in AbstractBitStreamGenerator, IIRC so
this is a little tricky.  Quite likely doable, though, if you or
anyone else has need for it.

Phil
>
>                 
>> Interface "RandomGenerator" is missing "nextLong(long)" method
>> --------------------------------------------------------------
>>
>>                 Key: MATH-963
>>                 URL: https://issues.apache.org/jira/browse/MATH-963
>>             Project: Commons Math
>>          Issue Type: Bug
>>    Affects Versions: 3.2
>>            Reporter: Gilles
>>            Priority: Trivial
>>              Labels: api-change
>>
>> There is a method "nextInt(int)" but not "nextLong(long)".
>> The "BitsStreamGenerator" class already implements it.
> --
> 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
>


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org
For additional commands, e-mail: dev-h...@commons.apache.org

Reply via email to