Reverting commit 921d0d60d4
as per Gilles request.
The work on revamping the random packages is perfoemd in the random-ravamp branch.
This commit is contained in:
parent
df46ed5edd
commit
aaf4027bfb
|
@ -41,11 +41,9 @@ import org.apache.commons.math4.util.FastMath;
|
|||
*
|
||||
* @since 3.0
|
||||
*/
|
||||
public class ISAACRandom
|
||||
extends BaseRandomGenerator
|
||||
implements Serializable {
|
||||
public class ISAACRandom extends BitsStreamGenerator implements Serializable {
|
||||
/** Serializable version identifier */
|
||||
private static final long serialVersionUID = 20151227L;
|
||||
private static final long serialVersionUID = 7288197941165002400L;
|
||||
/** Log of size of rsl[] and mem[] */
|
||||
private static final int SIZE_L = 8;
|
||||
/** Size of rsl[] and mem[] */
|
||||
|
@ -140,12 +138,12 @@ public class ISAACRandom
|
|||
|
||||
/** {@inheritDoc} */
|
||||
@Override
|
||||
public int nextInt() {
|
||||
protected int next(int bits) {
|
||||
if (count < 0) {
|
||||
isaac();
|
||||
count = SIZE - 1;
|
||||
}
|
||||
return rsl[count--];
|
||||
return rsl[count--] >>> 32 - bits;
|
||||
}
|
||||
|
||||
/** Generate 256 results */
|
||||
|
|
|
@ -22,7 +22,7 @@ import org.apache.commons.math4.random.RandomGenerator;
|
|||
import org.junit.Assert;
|
||||
import org.junit.Test;
|
||||
|
||||
public final class ISAACTest extends BaseRandomGeneratorTest {
|
||||
public final class ISAACTest extends RandomGeneratorAbstractTest {
|
||||
|
||||
@Override
|
||||
protected RandomGenerator makeGenerator() {
|
||||
|
|
Loading…
Reference in New Issue