Java org.apache.commons.math3.random Well19937a fields, constructors, methods, implement or subclass

Example usage for Java org.apache.commons.math3.random Well19937a fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for org.apache.commons.math3.random Well19937a.

The text is from its open source code.

Constructor

Well19937a()
Creates a new random number generator.
Well19937a(int seed)
Creates a new random number generator using a single int seed.
Well19937a(int[] seed)
Creates a new random number generator using an int array seed.
Well19937a(long seed)
Creates a new random number generator using a single long seed.

Method

intnextInt(int n)

This default implementation is copied from Apache Harmony java.util.Random (r929253).

Implementation notes:

  • If n is a power of 2, this method returns (int) ((n * (long) next(31)) >> 31) .
  • If n is not a power of 2, what is returned is next(31) % n with next(31) values rejected (i.e.
longnextLong()