@Test public void testGenerateBoolean() { final MersenneTwisterGenerateRandom rnd = new MersenneTwisterGenerateRandom(1); for (final boolean aBOOLEAN_TEST : BOOLEAN_TEST) { final boolean g = rnd.nextBoolean(); assertEquals(g, aBOOLEAN_TEST); } }
@Override public boolean nextBoolean() { return nextDouble() > 0.5; }
MersenneTwisterGenerateRandom extends AbstractBoxMuller { @Override public boolean nextBoolean() { return nextDouble() > 0.5; } }
MersenneTwisterGenerateRandom extends AbstractBoxMuller { @Override public boolean nextBoolean() { return nextDouble() > 0.5; } MersenneTwisterGenerateRandom();  MersenneTwisterGenerateRandom(final long seed);  MersenneTwisterGenerateRandom(final int[] array); }
MersenneTwisterGenerateRandom extends AbstractBoxMuller { @Override public boolean nextBoolean() { return nextDouble() > 0.5; } MersenneTwisterGenerateRandom();  MersenneTwisterGenerateRandom(final long seed);  MersenneTwisterGenerateRandom(final int[] array); void setSeed(final long seed); void setSeed(final int[] array); @Override double nextDouble(); long nextLong(); @Override boolean nextBoolean(); @Override float nextFloat(); @Override int nextInt(); }
MersenneTwisterGenerateRandom extends AbstractBoxMuller { @Override public boolean nextBoolean() { return nextDouble() > 0.5; } MersenneTwisterGenerateRandom();  MersenneTwisterGenerateRandom(final long seed);  MersenneTwisterGenerateRandom(final int[] array); void setSeed(final long seed); void setSeed(final int[] array); @Override double nextDouble(); long nextLong(); @Override boolean nextBoolean(); @Override float nextFloat(); @Override int nextInt();  }