Yes. MersenneTwisterFast follows java.util.Random's nextInt()
contract, which generates an integer uniformly selected from all
possible 2^32 values. Not including negatives would cut that to 2^31.
If you want nextInt() under a specific range between 0 ... n-1, try
nextInt(n).
Sean
On Apr 23, 2008, at 9:25 AM, Denis Robilliard wrote:
> The MersenneTwisterFast.nextInt() method produces both positive and
> negative values. Is it standard behaviour ?
>
> --
> Denis Robilliard
> L.I.L.
> Université du Littoral
> 50 rue F. Buisson
> 62100 Calais
|