commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Luc Maisonobe <...@spaceroots.org>
Subject Re: [Math] New base class for all RNGs
Date Sat, 26 Dec 2015 19:53:17 GMT
Le 26/12/2015 18:52, Gilles a écrit :
> Hi.
> 
> There are currently two RNG hierarchies: "AbstractRandomGenerator" and
> "BitsStreamGenerator". They both implement the "RandomGenerator" interface.
> 
> In both classes, the "nextBytes(byte[])" method generates 4 bytes at a
> time.
> Thus, functionally the code is the same, even though one calls "nextInt"
> and
> the other "next(32)" (which is what its "nextInt()" also calls).
> 
> I propose that a new base class implements "nextBytes" (and perhaps other
> methods that can be coded in a generic way):
>   https://issues.apache.org/jira/browse/MATH-1307
> 
> Are there objections?

Go for it.

Luc

> 
> Regards,
> Gilles
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org
> 
> 


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


Mime
View raw message