You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by ah...@apache.org on 2019/06/12 15:28:58 UTC
[commons-rng] branch master updated: RNG-107: Enable checkstyle for
the test sources.
This is an automated email from the ASF dual-hosted git repository.
aherbert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-rng.git
The following commit(s) were added to refs/heads/master by this push:
new 96f3734 RNG-107: Enable checkstyle for the test sources.
96f3734 is described below
commit 96f373486406387ddfddfe192607afd7d0011718
Author: Alex Herbert <ah...@apache.org>
AuthorDate: Wed Jun 12 09:29:47 2019 +0100
RNG-107: Enable checkstyle for the test sources.
- Add space around =
- Remove unnecessary parenthesis
- Remove unused imports
- Fix whitespace around braces
- Suppress certain allowed checks using suppressions file
- Fix indentation
---
.../apache/commons/rng/core/BaseProviderTest.java | 6 +-
.../rng/core/JumpableProvidersParametricTest.java | 18 +-
.../rng/core/Providers32ParametricTest.java | 6 +-
.../rng/core/Providers64ParametricTest.java | 6 +-
.../rng/core/ProvidersCommonParametricTest.java | 22 +-
.../org/apache/commons/rng/core/ProvidersList.java | 54 +--
.../org/apache/commons/rng/core/RandomAssert.java | 12 +-
.../rng/core/RandomProviderDefaultStateTest.java | 2 +-
.../commons/rng/core/source32/IntProviderTest.java | 8 +-
.../rng/core/source32/MersenneTwisterTest.java | 2 +-
.../rng/core/source32/XoRoShiRo64StarStarTest.java | 2 +-
.../rng/core/source32/XoRoShiRo64StarTest.java | 2 +-
.../rng/core/source32/XoShiRo128StarStarTest.java | 2 +-
.../rng/core/source64/LongProviderTest.java | 16 +-
.../rng/core/source64/MersenneTwister64Test.java | 502 ++++++++++-----------
.../commons/rng/core/source64/TwoCmresTest.java | 4 +-
.../commons/rng/core/util/NumberFactoryTest.java | 14 +-
.../rng/sampling/CollectionSamplerTest.java | 2 +-
.../rng/sampling/CombinationSamplerTest.java | 6 +-
.../DiscreteProbabilityCollectionSamplerTest.java | 21 +-
.../commons/rng/sampling/ListSamplerTest.java | 16 +-
.../rng/sampling/PermutationSamplerTest.java | 30 +-
.../rng/sampling/UnitSphereSamplerTest.java | 6 +-
.../AhrensDieterExponentialSamplerTest.java | 2 +-
...AhrensDieterMarsagliaTsangGammaSamplerTest.java | 4 +-
.../distribution/BoxMullerGaussianSamplerTest.java | 2 +-
.../BoxMullerLogNormalSamplerTest.java | 4 +-
.../distribution/ChengBetaSamplerTest.java | 4 +-
.../ContinuousSamplerParametricTest.java | 11 +-
.../distribution/ContinuousSamplerTestData.java | 4 +-
.../distribution/ContinuousSamplersList.java | 34 +-
.../distribution/ContinuousUniformSamplerTest.java | 4 +-
.../DiscreteSamplerParametricTest.java | 10 +-
.../distribution/DiscreteSamplerTestData.java | 6 +-
.../distribution/DiscreteSamplersList.java | 46 +-
.../distribution/DiscreteUniformSamplerTest.java | 4 +-
.../sampling/distribution/GaussianSamplerTest.java | 2 +-
.../InverseTransformParetoSamplerTest.java | 4 +-
.../KempSmallMeanPoissonSamplerTest.java | 2 +
.../distribution/LargeMeanPoissonSamplerTest.java | 10 +-
.../distribution/LogNormalSamplerTest.java | 4 +-
.../MarsagliaTsangWangDiscreteSamplerTest.java | 36 +-
.../distribution/PoissonSamplerCacheTest.java | 17 +-
.../RejectionInversionZipfSamplerTest.java | 4 +-
.../distribution/SmallMeanPoissonSamplerTest.java | 8 +-
.../ZigguratNormalizedGaussianSamplerTest.java | 2 +
.../rng/simple/ProvidersCommonParametricTest.java | 24 +-
.../apache/commons/rng/simple/ProvidersList.java | 54 +--
.../apache/commons/rng/simple/RandomAssert.java | 7 +-
.../rng/simple/ThreadLocalRandomSourceTest.java | 4 +-
.../internal/NativeSeedTypeParametricTest.java | 28 +-
.../RandomSourceInternalParametricTest.java | 8 +-
pom.xml | 2 +-
.../checkstyle/checkstyle-suppressions.xml | 7 +
54 files changed, 573 insertions(+), 544 deletions(-)
diff --git a/commons-rng-core/src/test/java/org/apache/commons/rng/core/BaseProviderTest.java b/commons-rng-core/src/test/java/org/apache/commons/rng/core/BaseProviderTest.java
index edb6343..8abcbe9 100644
--- a/commons-rng-core/src/test/java/org/apache/commons/rng/core/BaseProviderTest.java
+++ b/commons-rng-core/src/test/java/org/apache/commons/rng/core/BaseProviderTest.java
@@ -29,7 +29,7 @@ import org.junit.Assume;
* tests too).
*/
public class BaseProviderTest {
- @Test(expected=IllegalStateException.class)
+ @Test(expected = IllegalStateException.class)
public void testStateSizeTooSmall() {
final DummyGenerator dummy = new DummyGenerator();
final int size = dummy.getStateSize();
@@ -37,7 +37,7 @@ public class BaseProviderTest {
dummy.restoreState(new RandomProviderDefaultState(new byte[size - 1]));
}
- @Test(expected=IllegalStateException.class)
+ @Test(expected = IllegalStateException.class)
public void testStateSizeTooLarge() {
final DummyGenerator dummy = new DummyGenerator();
final int size = dummy.getStateSize();
@@ -81,7 +81,7 @@ public class BaseProviderTest {
}
/**
- * Dummy class for checking the behaviour of
+ * Dummy class for checking the behaviour of the IntProvider. Tests:
* <ul>
* <li>an incomplete implementation</li>
* <li>{@code fillState} methods with "protected" access</li>
diff --git a/commons-rng-core/src/test/java/org/apache/commons/rng/core/JumpableProvidersParametricTest.java b/commons-rng-core/src/test/java/org/apache/commons/rng/core/JumpableProvidersParametricTest.java
index 4372787..83a5da6 100644
--- a/commons-rng-core/src/test/java/org/apache/commons/rng/core/JumpableProvidersParametricTest.java
+++ b/commons-rng-core/src/test/java/org/apache/commons/rng/core/JumpableProvidersParametricTest.java
@@ -39,13 +39,13 @@ import org.apache.commons.rng.core.source64.LongProvider;
@RunWith(value = Parameterized.class)
public class JumpableProvidersParametricTest {
/** The size of the state for the IntProvider. */
- private static final int intProviderStateSize;
+ private static final int INT_PROVIDER_STATE_SIZE;
/** The size of the state for the LongProvider. */
- private static final int longProviderStateSize;
+ private static final int LONG_PROVIDER_STATE_SIZE;
static {
- intProviderStateSize = new State32Generator().getStateSize();
- longProviderStateSize = new State64Generator().getStateSize();
+ INT_PROVIDER_STATE_SIZE = new State32Generator().getStateSize();
+ LONG_PROVIDER_STATE_SIZE = new State64Generator().getStateSize();
}
/** RNG under test. */
@@ -195,9 +195,9 @@ public class JumpableProvidersParametricTest {
@Test
public void testJumpResetsDefaultState() {
if (generator instanceof IntProvider) {
- assertJumpResetsDefaultState(getJumpFunction(), intProviderStateSize);
+ assertJumpResetsDefaultState(getJumpFunction(), INT_PROVIDER_STATE_SIZE);
} else if (generator instanceof LongProvider) {
- assertJumpResetsDefaultState(getJumpFunction(), longProviderStateSize);
+ assertJumpResetsDefaultState(getJumpFunction(), LONG_PROVIDER_STATE_SIZE);
}
}
@@ -208,9 +208,9 @@ public class JumpableProvidersParametricTest {
@Test
public void testLongJumpResetsDefaultState() {
if (generator instanceof IntProvider) {
- assertJumpResetsDefaultState(getLongJumpFunction(), intProviderStateSize);
+ assertJumpResetsDefaultState(getLongJumpFunction(), INT_PROVIDER_STATE_SIZE);
} else if (generator instanceof LongProvider) {
- assertJumpResetsDefaultState(getLongJumpFunction(), longProviderStateSize);
+ assertJumpResetsDefaultState(getLongJumpFunction(), LONG_PROVIDER_STATE_SIZE);
}
}
@@ -291,7 +291,7 @@ public class JumpableProvidersParametricTest {
/**
* Specify the jump operation to test.
- *
+ *
* <p>This allows testing {@link JumpableUniformRandomProvider} or
* {@link LongJumpableUniformRandomProvider}.</p>
*/
diff --git a/commons-rng-core/src/test/java/org/apache/commons/rng/core/Providers32ParametricTest.java b/commons-rng-core/src/test/java/org/apache/commons/rng/core/Providers32ParametricTest.java
index 726fa52..319400a 100644
--- a/commons-rng-core/src/test/java/org/apache/commons/rng/core/Providers32ParametricTest.java
+++ b/commons-rng-core/src/test/java/org/apache/commons/rng/core/Providers32ParametricTest.java
@@ -26,7 +26,7 @@ import org.apache.commons.rng.RestorableUniformRandomProvider;
/**
* Tests which all 32-bits based generators must pass.
*/
-@RunWith(value=Parameterized.class)
+@RunWith(value = Parameterized.class)
public class Providers32ParametricTest {
/** RNG under test. */
private final RestorableUniformRandomProvider generator;
@@ -47,8 +47,8 @@ public class Providers32ParametricTest {
@Test
public void testNextBytesChunks() {
- final int[] chunkSizes = { 4, 8, 12, 16 };
- final int[] chunks = { 1, 2, 3, 4, 5 };
+ final int[] chunkSizes = {4, 8, 12, 16};
+ final int[] chunks = {1, 2, 3, 4, 5};
for (int chunkSize : chunkSizes) {
for (int numChunks : chunks) {
ProvidersCommonParametricTest.checkNextBytesChunks(generator,
diff --git a/commons-rng-core/src/test/java/org/apache/commons/rng/core/Providers64ParametricTest.java b/commons-rng-core/src/test/java/org/apache/commons/rng/core/Providers64ParametricTest.java
index d3445de..61a1d35 100644
--- a/commons-rng-core/src/test/java/org/apache/commons/rng/core/Providers64ParametricTest.java
+++ b/commons-rng-core/src/test/java/org/apache/commons/rng/core/Providers64ParametricTest.java
@@ -26,7 +26,7 @@ import org.apache.commons.rng.RestorableUniformRandomProvider;
/**
* Tests which all 64-bits based generators must pass.
*/
-@RunWith(value=Parameterized.class)
+@RunWith(value = Parameterized.class)
public class Providers64ParametricTest {
/** RNG under test. */
private final RestorableUniformRandomProvider generator;
@@ -47,8 +47,8 @@ public class Providers64ParametricTest {
@Test
public void testNextBytesChunks() {
- final int[] chunkSizes = { 8, 16, 24 };
- final int[] chunks = { 1, 2, 3, 4, 5 };
+ final int[] chunkSizes = {8, 16, 24};
+ final int[] chunks = {1, 2, 3, 4, 5};
for (int chunkSize : chunkSizes) {
for (int numChunks : chunks) {
ProvidersCommonParametricTest.checkNextBytesChunks(generator,
diff --git a/commons-rng-core/src/test/java/org/apache/commons/rng/core/ProvidersCommonParametricTest.java b/commons-rng-core/src/test/java/org/apache/commons/rng/core/ProvidersCommonParametricTest.java
index dd31232..07489dd 100644
--- a/commons-rng-core/src/test/java/org/apache/commons/rng/core/ProvidersCommonParametricTest.java
+++ b/commons-rng-core/src/test/java/org/apache/commons/rng/core/ProvidersCommonParametricTest.java
@@ -34,7 +34,7 @@ import org.apache.commons.rng.RandomProviderState;
/**
* Tests which all generators must pass.
*/
-@RunWith(value=Parameterized.class)
+@RunWith(value = Parameterized.class)
public class ProvidersCommonParametricTest {
/** RNG under test. */
private final RestorableUniformRandomProvider generator;
@@ -56,47 +56,47 @@ public class ProvidersCommonParametricTest {
// Precondition tests
- @Test(expected=IllegalArgumentException.class)
+ @Test(expected = IllegalArgumentException.class)
public void testPreconditionNextInt1() {
generator.nextInt(-1);
}
- @Test(expected=IllegalArgumentException.class)
+ @Test(expected = IllegalArgumentException.class)
public void testPreconditionNextInt2() {
generator.nextInt(0);
}
- @Test(expected=IllegalArgumentException.class)
+ @Test(expected = IllegalArgumentException.class)
public void testPreconditionNextLong1() {
generator.nextLong(-1);
}
- @Test(expected=IllegalArgumentException.class)
+ @Test(expected = IllegalArgumentException.class)
public void testPreconditionNextLong2() {
generator.nextLong(0);
}
- @Test(expected=IndexOutOfBoundsException.class)
+ @Test(expected = IndexOutOfBoundsException.class)
public void testPreconditionNextBytes1() {
final int size = 10;
final int num = 1;
final byte[] buf = new byte[size];
generator.nextBytes(buf, -1, num);
}
- @Test(expected=IndexOutOfBoundsException.class)
+ @Test(expected = IndexOutOfBoundsException.class)
public void testPreconditionNextBytes2() {
final int size = 10;
final byte[] buf = new byte[size];
generator.nextBytes(buf, size, 0);
}
- @Test(expected=IndexOutOfBoundsException.class)
+ @Test(expected = IndexOutOfBoundsException.class)
public void testPreconditionNextBytes3() {
final int size = 10;
final int offset = 2;
final byte[] buf = new byte[size];
generator.nextBytes(buf, offset, size - offset + 1);
}
- @Test(expected=IndexOutOfBoundsException.class)
+ @Test(expected = IndexOutOfBoundsException.class)
public void testPreconditionNextBytes4() {
final int size = 10;
final int offset = 1;
@@ -245,14 +245,14 @@ public class ProvidersCommonParametricTest {
Assert.assertTrue(listOrig.equals(listReplay));
}
- @Test(expected=IllegalStateException.class)
+ @Test(expected = IllegalStateException.class)
public void testStateWrongSize() {
final RandomProviderState state = new DummyGenerator().saveState();
// Try to restore with an invalid state (wrong size).
generator.restoreState(state);
}
- @Test(expected=IllegalArgumentException.class)
+ @Test(expected = IllegalArgumentException.class)
public void testRestoreForeignState() {
generator.restoreState(new RandomProviderState() {});
}
diff --git a/commons-rng-core/src/test/java/org/apache/commons/rng/core/ProvidersList.java b/commons-rng-core/src/test/java/org/apache/commons/rng/core/ProvidersList.java
index 163fd09..576b6b6 100644
--- a/commons-rng-core/src/test/java/org/apache/commons/rng/core/ProvidersList.java
+++ b/commons-rng-core/src/test/java/org/apache/commons/rng/core/ProvidersList.java
@@ -59,7 +59,7 @@ import org.apache.commons.rng.RestorableUniformRandomProvider;
* @see #list32()
* @see #list64()
*/
-public class ProvidersList {
+public final class ProvidersList {
/** List of all RNGs implemented in the library. */
private static final List<RestorableUniformRandomProvider[]> LIST =
new ArrayList<RestorableUniformRandomProvider[]>();
@@ -80,35 +80,35 @@ public class ProvidersList {
try {
// "int"-based RNGs.
add(LIST32, new JDKRandom(g.nextLong()));
- add(LIST32, new MersenneTwister(new int[] { g.nextInt(), g.nextInt(), g.nextInt() }));
- add(LIST32, new Well512a(new int[] { g.nextInt(), g.nextInt(), g.nextInt() }));
- add(LIST32, new Well1024a(new int[] { g.nextInt(), g.nextInt(), g.nextInt() }));
- add(LIST32, new Well19937a(new int[] { g.nextInt(), g.nextInt(), g.nextInt() }));
- add(LIST32, new Well19937c(new int[] { g.nextInt(), g.nextInt(), g.nextInt() }));
- add(LIST32, new Well44497a(new int[] { g.nextInt(), g.nextInt(), g.nextInt() }));
- add(LIST32, new Well44497b(new int[] { g.nextInt(), g.nextInt(), g.nextInt() }));
- add(LIST32, new ISAACRandom(new int[] { g.nextInt(), g.nextInt(), g.nextInt() }));
- add(LIST32, new MultiplyWithCarry256(new int[] { g.nextInt(), g.nextInt(), g.nextInt() }));
- add(LIST32, new KISSRandom(new int[] { g.nextInt(), g.nextInt(), g.nextInt() }));
- add(LIST32, new XoRoShiRo64Star(new int[] { g.nextInt(), g.nextInt() }));
- add(LIST32, new XoRoShiRo64StarStar(new int[] { g.nextInt(), g.nextInt(), g.nextInt() }));
- add(LIST32, new XoShiRo128Plus(new int[] { g.nextInt(), g.nextInt(), g.nextInt() }));
- add(LIST32, new XoShiRo128StarStar(new int[] { g.nextInt(), g.nextInt(), g.nextInt() }));
+ add(LIST32, new MersenneTwister(new int[] {g.nextInt(), g.nextInt(), g.nextInt()}));
+ add(LIST32, new Well512a(new int[] {g.nextInt(), g.nextInt(), g.nextInt()}));
+ add(LIST32, new Well1024a(new int[] {g.nextInt(), g.nextInt(), g.nextInt()}));
+ add(LIST32, new Well19937a(new int[] {g.nextInt(), g.nextInt(), g.nextInt()}));
+ add(LIST32, new Well19937c(new int[] {g.nextInt(), g.nextInt(), g.nextInt()}));
+ add(LIST32, new Well44497a(new int[] {g.nextInt(), g.nextInt(), g.nextInt()}));
+ add(LIST32, new Well44497b(new int[] {g.nextInt(), g.nextInt(), g.nextInt()}));
+ add(LIST32, new ISAACRandom(new int[] {g.nextInt(), g.nextInt(), g.nextInt()}));
+ add(LIST32, new MultiplyWithCarry256(new int[] {g.nextInt(), g.nextInt(), g.nextInt()}));
+ add(LIST32, new KISSRandom(new int[] {g.nextInt(), g.nextInt(), g.nextInt()}));
+ add(LIST32, new XoRoShiRo64Star(new int[] {g.nextInt(), g.nextInt()}));
+ add(LIST32, new XoRoShiRo64StarStar(new int[] {g.nextInt(), g.nextInt(), g.nextInt()}));
+ add(LIST32, new XoShiRo128Plus(new int[] {g.nextInt(), g.nextInt(), g.nextInt()}));
+ add(LIST32, new XoShiRo128StarStar(new int[] {g.nextInt(), g.nextInt(), g.nextInt()}));
// ... add more here.
// "long"-based RNGs.
add(LIST64, new SplitMix64(g.nextLong()));
- add(LIST64, new XorShift1024Star(new long[] { g.nextLong(), g.nextLong(), g.nextLong(), g.nextLong() }));
- add(LIST64, new XorShift1024StarPhi(new long[] { g.nextLong(), g.nextLong(), g.nextLong(), g.nextLong() }));
+ add(LIST64, new XorShift1024Star(new long[] {g.nextLong(), g.nextLong(), g.nextLong(), g.nextLong()}));
+ add(LIST64, new XorShift1024StarPhi(new long[] {g.nextLong(), g.nextLong(), g.nextLong(), g.nextLong()}));
add(LIST64, new TwoCmres(g.nextInt()));
add(LIST64, new TwoCmres(g.nextInt(), 5, 8));
- add(LIST64, new MersenneTwister64(new long[] { g.nextLong(), g.nextLong(), g.nextLong(), g.nextLong() }));
- add(LIST64, new XoRoShiRo128Plus(new long[] { g.nextLong(), g.nextLong() }));
- add(LIST64, new XoRoShiRo128StarStar(new long[] { g.nextLong(), g.nextLong() }));
- add(LIST64, new XoShiRo256Plus(new long[] { g.nextLong(), g.nextLong(), g.nextLong(), g.nextLong() }));
- add(LIST64, new XoShiRo256StarStar(new long[] { g.nextLong(), g.nextLong(), g.nextLong(), g.nextLong() }));
- add(LIST64, new XoShiRo512Plus(new long[] { g.nextLong(), g.nextLong(), g.nextLong(), g.nextLong() }));
- add(LIST64, new XoShiRo512StarStar(new long[] { g.nextLong(), g.nextLong(), g.nextLong(), g.nextLong() }));
+ add(LIST64, new MersenneTwister64(new long[] {g.nextLong(), g.nextLong(), g.nextLong(), g.nextLong()}));
+ add(LIST64, new XoRoShiRo128Plus(new long[] {g.nextLong(), g.nextLong()}));
+ add(LIST64, new XoRoShiRo128StarStar(new long[] {g.nextLong(), g.nextLong()}));
+ add(LIST64, new XoShiRo256Plus(new long[] {g.nextLong(), g.nextLong(), g.nextLong(), g.nextLong()}));
+ add(LIST64, new XoShiRo256StarStar(new long[] {g.nextLong(), g.nextLong(), g.nextLong(), g.nextLong()}));
+ add(LIST64, new XoShiRo512Plus(new long[] {g.nextLong(), g.nextLong(), g.nextLong(), g.nextLong()}));
+ add(LIST64, new XoShiRo512StarStar(new long[] {g.nextLong(), g.nextLong(), g.nextLong(), g.nextLong()}));
// ... add more here.
// Do not modify the remaining statements.
@@ -122,8 +122,10 @@ public class ProvidersList {
}
}
} catch (Exception e) {
+ // CHECKSTYLE: stop Regexp
System.err.println("Unexpected exception while creating the list of generators: " + e);
e.printStackTrace(System.err);
+ // CHECKSTYLE: resume Regexp
throw new RuntimeException(e);
}
}
@@ -139,7 +141,7 @@ public class ProvidersList {
*/
private static void add(List<RestorableUniformRandomProvider[]> list,
RestorableUniformRandomProvider rng) {
- list.add(new RestorableUniformRandomProvider[] { rng });
+ list.add(new RestorableUniformRandomProvider[] {rng});
}
/**
@@ -148,7 +150,7 @@ public class ProvidersList {
*/
private static void add(List<JumpableUniformRandomProvider[]> list,
JumpableUniformRandomProvider rng) {
- list.add(new JumpableUniformRandomProvider[] { rng });
+ list.add(new JumpableUniformRandomProvider[] {rng});
}
/**
diff --git a/commons-rng-core/src/test/java/org/apache/commons/rng/core/RandomAssert.java b/commons-rng-core/src/test/java/org/apache/commons/rng/core/RandomAssert.java
index 5bae5a8..19b4ecd 100644
--- a/commons-rng-core/src/test/java/org/apache/commons/rng/core/RandomAssert.java
+++ b/commons-rng-core/src/test/java/org/apache/commons/rng/core/RandomAssert.java
@@ -18,21 +18,23 @@
package org.apache.commons.rng.core;
import org.junit.Assert;
-import org.junit.Assume;
import java.lang.reflect.Constructor;
import java.lang.reflect.InvocationTargetException;
import org.apache.commons.rng.JumpableUniformRandomProvider;
import org.apache.commons.rng.LongJumpableUniformRandomProvider;
-import org.apache.commons.rng.RandomProviderState;
-import org.apache.commons.rng.RestorableUniformRandomProvider;
import org.apache.commons.rng.UniformRandomProvider;
/**
* Utility class for testing random generators.
*/
-public class RandomAssert {
+public final class RandomAssert {
+ /**
+ * Class contains only static methods.
+ */
+ private RandomAssert() {}
+
/**
* Assert that the random generator produces the expected output.
*
@@ -245,7 +247,7 @@ public class RandomAssert {
* Assert that following a set number of warm-up cycles the random generator produces
* at least one non-zero output for {@link UniformRandomProvider#nextLong()} over the
* given number of test cycles.
- *
+ *
* <p>Helper function to add the seed element and bit that was non zero to the fail message.
*
* @param rng Random generator.
diff --git a/commons-rng-core/src/test/java/org/apache/commons/rng/core/RandomProviderDefaultStateTest.java b/commons-rng-core/src/test/java/org/apache/commons/rng/core/RandomProviderDefaultStateTest.java
index af1f28b..305f8ae 100644
--- a/commons-rng-core/src/test/java/org/apache/commons/rng/core/RandomProviderDefaultStateTest.java
+++ b/commons-rng-core/src/test/java/org/apache/commons/rng/core/RandomProviderDefaultStateTest.java
@@ -27,7 +27,7 @@ import org.junit.Assert;
public class RandomProviderDefaultStateTest {
@Test
public void testConsistency() {
- final byte[] internalState = { 1, 0, -23, 67, -128, 54, 100, 127 };
+ final byte[] internalState = {1, 0, -23, 67, -128, 54, 100, 127};
final RandomProviderDefaultState state = new RandomProviderDefaultState(internalState);
Assert.assertTrue(Arrays.equals(internalState, state.getState()));
diff --git a/commons-rng-core/src/test/java/org/apache/commons/rng/core/source32/IntProviderTest.java b/commons-rng-core/src/test/java/org/apache/commons/rng/core/source32/IntProviderTest.java
index e132d0c..7c01313 100644
--- a/commons-rng-core/src/test/java/org/apache/commons/rng/core/source32/IntProviderTest.java
+++ b/commons-rng-core/src/test/java/org/apache/commons/rng/core/source32/IntProviderTest.java
@@ -36,7 +36,7 @@ public class IntProviderTest {
/**
* @param value the value
*/
- public FlipIntProvider(int value) {
+ FlipIntProvider(int value) {
// Flip the bits so the first call to next() returns to the same state
this.value = ~value;
}
@@ -63,14 +63,14 @@ public class IntProviderTest {
final IntProvider provider = new FlipIntProvider(value);
// Test the result for a single pass over the long
for (int j = 0; j < Integer.SIZE; j++) {
- final boolean expected = (i == j);
+ final boolean expected = i == j;
Assert.assertEquals("Pass 1, bit " + j, expected, provider.nextBoolean());
}
// The second pass should use the opposite bits
for (int j = 0; j < Integer.SIZE; j++) {
- final boolean expected = (i != j);
+ final boolean expected = i != j;
Assert.assertEquals("Pass 2, bit " + j, expected, provider.nextBoolean());
}
}
}
-}
\ No newline at end of file
+}
diff --git a/commons-rng-core/src/test/java/org/apache/commons/rng/core/source32/MersenneTwisterTest.java b/commons-rng-core/src/test/java/org/apache/commons/rng/core/source32/MersenneTwisterTest.java
index a215f05..04f382e 100644
--- a/commons-rng-core/src/test/java/org/apache/commons/rng/core/source32/MersenneTwisterTest.java
+++ b/commons-rng-core/src/test/java/org/apache/commons/rng/core/source32/MersenneTwisterTest.java
@@ -23,7 +23,7 @@ import org.junit.Test;
public class MersenneTwisterTest {
@Test
public void testMakotoNishimura() {
- final MersenneTwister rng = new MersenneTwister(new int[] { 0x123, 0x234, 0x345, 0x456 });
+ final MersenneTwister rng = new MersenneTwister(new int[] {0x123, 0x234, 0x345, 0x456});
/*
* Data from
diff --git a/commons-rng-core/src/test/java/org/apache/commons/rng/core/source32/XoRoShiRo64StarStarTest.java b/commons-rng-core/src/test/java/org/apache/commons/rng/core/source32/XoRoShiRo64StarStarTest.java
index 594cce3..388e784 100644
--- a/commons-rng-core/src/test/java/org/apache/commons/rng/core/source32/XoRoShiRo64StarStarTest.java
+++ b/commons-rng-core/src/test/java/org/apache/commons/rng/core/source32/XoRoShiRo64StarStarTest.java
@@ -62,7 +62,7 @@ public class XoRoShiRo64StarStarTest {
@Test
public void testConstructorWithoutFullLengthSeed() {
// Hit the case when the input seed is self-seeded when not full length
- new XoRoShiRo64StarStar(new int[] { 0x012de1ba });
+ new XoRoShiRo64StarStar(new int[] {0x012de1ba});
}
@Test
diff --git a/commons-rng-core/src/test/java/org/apache/commons/rng/core/source32/XoRoShiRo64StarTest.java b/commons-rng-core/src/test/java/org/apache/commons/rng/core/source32/XoRoShiRo64StarTest.java
index 7a45bab..2861963 100644
--- a/commons-rng-core/src/test/java/org/apache/commons/rng/core/source32/XoRoShiRo64StarTest.java
+++ b/commons-rng-core/src/test/java/org/apache/commons/rng/core/source32/XoRoShiRo64StarTest.java
@@ -62,7 +62,7 @@ public class XoRoShiRo64StarTest {
@Test
public void testConstructorWithoutFullLengthSeed() {
// Hit the case when the input seed is self-seeded when not full length
- new XoRoShiRo64Star(new int[] { 0x012de1ba });
+ new XoRoShiRo64Star(new int[] {0x012de1ba});
}
@Test
diff --git a/commons-rng-core/src/test/java/org/apache/commons/rng/core/source32/XoShiRo128StarStarTest.java b/commons-rng-core/src/test/java/org/apache/commons/rng/core/source32/XoShiRo128StarStarTest.java
index bd5b6ab..75fdbaa 100644
--- a/commons-rng-core/src/test/java/org/apache/commons/rng/core/source32/XoShiRo128StarStarTest.java
+++ b/commons-rng-core/src/test/java/org/apache/commons/rng/core/source32/XoShiRo128StarStarTest.java
@@ -88,6 +88,6 @@ public class XoShiRo128StarStarTest {
@Test
public void testJump() {
- RandomAssert.assertJumpEquals(EXPECTED_SEQUENCE, EXPECTED_SEQUENCE_AFTER_JUMP , new XoShiRo128StarStar(SEED));
+ RandomAssert.assertJumpEquals(EXPECTED_SEQUENCE, EXPECTED_SEQUENCE_AFTER_JUMP, new XoShiRo128StarStar(SEED));
}
}
diff --git a/commons-rng-core/src/test/java/org/apache/commons/rng/core/source64/LongProviderTest.java b/commons-rng-core/src/test/java/org/apache/commons/rng/core/source64/LongProviderTest.java
index ba666d3..21e16ae 100644
--- a/commons-rng-core/src/test/java/org/apache/commons/rng/core/source64/LongProviderTest.java
+++ b/commons-rng-core/src/test/java/org/apache/commons/rng/core/source64/LongProviderTest.java
@@ -36,7 +36,7 @@ public class LongProviderTest {
/**
* @param value the value
*/
- public FixedLongProvider(long value) {
+ FixedLongProvider(long value) {
this.value = value;
}
@@ -57,7 +57,7 @@ public class LongProviderTest {
/**
* @param value the value
*/
- public FlipLongProvider(long value) {
+ FlipLongProvider(long value) {
// Flip the bits so the first call to next() returns to the same state
this.value = ~value;
}
@@ -76,9 +76,9 @@ public class LongProviderTest {
*/
@Test
public void testNextInt() {
- final int MAX = 5;
- for (int i = 0; i < MAX; i++) {
- for (int j = 0; j < MAX; j++) {
+ final int max = 5;
+ for (int i = 0; i < max; i++) {
+ for (int j = 0; j < max; j++) {
// Pack into upper then lower bits
final long value = (((long) i) << 32) | (j & 0xffffffffL);
final LongProvider provider = new FixedLongProvider(value);
@@ -104,14 +104,14 @@ public class LongProviderTest {
final LongProvider provider = new FlipLongProvider(value);
// Test the result for a single pass over the long
for (int j = 0; j < Long.SIZE; j++) {
- final boolean expected = (i == j);
+ final boolean expected = i == j;
Assert.assertEquals("Pass 1, bit " + j, expected, provider.nextBoolean());
}
// The second pass should use the opposite bits
for (int j = 0; j < Long.SIZE; j++) {
- final boolean expected = (i != j);
+ final boolean expected = i != j;
Assert.assertEquals("Pass 2, bit " + j, expected, provider.nextBoolean());
}
}
}
-}
\ No newline at end of file
+}
diff --git a/commons-rng-core/src/test/java/org/apache/commons/rng/core/source64/MersenneTwister64Test.java b/commons-rng-core/src/test/java/org/apache/commons/rng/core/source64/MersenneTwister64Test.java
index b80d524..0381f48 100644
--- a/commons-rng-core/src/test/java/org/apache/commons/rng/core/source64/MersenneTwister64Test.java
+++ b/commons-rng-core/src/test/java/org/apache/commons/rng/core/source64/MersenneTwister64Test.java
@@ -23,7 +23,7 @@ import org.junit.Test;
public class MersenneTwister64Test {
@Test
public void testMakotoNishimura() {
- final MersenneTwister64 rng = new MersenneTwister64(new long[] { 0x12345L, 0x23456L, 0x34567L, 0x45678L });
+ final MersenneTwister64 rng = new MersenneTwister64(new long[] {0x12345L, 0x23456L, 0x34567L, 0x45678L});
/*
* Data from
@@ -31,256 +31,256 @@ public class MersenneTwister64Test {
* converted to hexadecimal.
*/
final long[] expectedSequence = {
- 0x64d79b552a559d7fL, 0x44a572665a6ee240L, 0xeb2bf6dc3d72135cL, 0xe3836981f9f82ea0L,
- 0x43a38212350ee392L, 0xce77502bffcacf8bL, 0x5d8a82d90126f0e7L, 0xc0510c6f402c1e3cL,
- 0x48d895bf8b69f77bL, 0x8d9fbb371f1de07fL, 0x1126b97be8c91ce2L, 0xf05e1c9dc2674be2L,
- 0xe4d5327a12874c1eL, 0x7c1951ea43a7500dL, 0xbba2bbfbecbc239aL, 0xc5704350b17f0215L,
- 0x823a67c5f88337e7L, 0xd9bf140bfeb4c1a9L, 0x9fbe3cfcd1f08059L, 0xdc29309412e352b9L,
- 0x5a0ff7908b1b3c57L, 0x46f39cb43b126c55L, 0x9648168491f3b126L, 0xdd3e72538fd39a1cL,
- 0xd65a3663fc9b0898L, 0x421ee7823c2af2ebL, 0xcba3a4b69b6ed152L, 0x0348399b7d2b8428L,
- 0xbdb750bf00c34a38L, 0xcf36d95eae514f52L, 0x7b9231d5308d7534L, 0xb225e28cfc5aa663L,
- 0xa833f6d5c72448a4L, 0xdaa565f5815de899L, 0x4b051d1e4cc78eb8L, 0x97fcd1b4d342e575L,
- 0xef6a48be001729c7L, 0x3982f1fa31afeab8L, 0xfdc570ba2fe979fbL, 0xb57697121dfdfe93L,
- 0x96524e209b767c29L, 0x55aad0ebca994043L, 0xb22687b88856b63eL, 0xb313b667a4d999d6L,
- 0x07c7fa1bd6fd7deaL, 0x0ee9f4c15c57e92aL, 0xc5fb71b8f4bf5f56L, 0xa251f93a4b335492L,
- 0xb9bad7f9e5b07befL, 0x62fc9ac35ccde7aaL, 0x933792382b0218a3L, 0x7d497d2f7a15eaf8L,
- 0xb2f0624214f522a2L, 0xd9895bbb810ec3d6L, 0x22d91b683f251121L, 0xc8fe9a347247affdL,
- 0x3462898a2ae7b001L, 0x468bc3a10a34890cL, 0x84ff6ce56552b185L, 0xed95ff232c511188L,
- 0x4869be47a8137c83L, 0x934606951e6fcd81L, 0x1ab5e8e453bde710L, 0x6386b61b30fa1157L,
- 0x97f3a778e242d0cfL, 0xd870d281b293af3dL, 0xc3a5f903a836fafdL, 0x088bd6a24d49cd77L,
- 0x4e38ddc2719162a5L, 0xf48286b4f22cad94L, 0x080f6f650c337557L, 0x05e6daf6aae1ad59L,
- 0x7450f7229f336762L, 0xb75b43fb4c81784aL, 0xebd37a514f153148L, 0x0d4b3a39e0bc52c7L,
- 0x562f36fae610a2e1L, 0x0e0e413e555bd736L, 0xd452549efe08402dL, 0xf2e2ff7be2c75e21L,
- 0xf2385606c18aaf0dL, 0xdb609b507d8c6b8bL, 0x74ac5663c6c4f45bL, 0x0d84c9a356858060L,
- 0x19d5b3643bc029b6L, 0x0dd8131e97ffc842L, 0xfa7303606bfffc05L, 0xf98c6d63ff48a16eL,
- 0x34df46aa2d610767L, 0x83490ef054537f7eL, 0xe071f833e55ebfe6L, 0x0d4b94537ed4a6aaL,
- 0x3cf85e4e333966fdL, 0xba15364649384016L, 0xc0e6bd623ca72405L, 0xdae6e879b8eab74aL,
- 0xe4a41f17e70d3e0aL, 0x56e10c00dd580f70L, 0xa9a66bb41781d872L, 0x58e42dbdffe21573L,
- 0x69450e1ce9674e6aL, 0x47fe345a350aa605L, 0xac958aa80455a5a4L, 0xbc1abca3fbeeb2f3L,
- 0x08f760d9228900a4L, 0x9e1eb8a2dfec4387L, 0xe91bd1321f5fdc89L, 0xda11a24c514b9dc7L,
- 0xb1f63d976e0e639bL, 0x41c11098f6123861L, 0x3d7736979f978f68L, 0x0820685b38c926beL,
- 0x0e8c3dcab075b112L, 0x5e37299d89089ba4L, 0xa1f735eb8235b32fL, 0x2289d719e7b146eeL,
- 0x1c9c9d0284d96719L, 0x5f8b358546775be8L, 0x317e34c009a07a39L, 0xb16b073eb0ee0a19L,
- 0x423b36fd459f2a66L, 0x5f45053666f3f84fL, 0x63e7074f03c73d92L, 0x22080cf23288e895L,
- 0xba4e71bf61dac16fL, 0x9643b3707db2cfb5L, 0x98e2db6c665e7178L, 0xcbc57de0ef3eabb6L,
- 0x6239a2197582a8a8L, 0xf2ae968e55fda13dL, 0x36e7ac11d1f3a617L, 0x508f0acb609bd756L,
- 0x6f42d435193a1ac2L, 0x2df2cab9d65e0b00L, 0x4584c1fde5f1ad55L, 0x602c500bdc8317c2L,
- 0xc80d5b04f6337337L, 0x98abcf971892a773L, 0x5d33cf557e6c4475L, 0x05b5a78be74ccd40L,
- 0x3ec2cce5290785f4L, 0x2eef1e9c4b36828bL, 0xdd274241a0ce8c55L, 0x3c4cb919b35c221cL,
- 0xc1fd68d779db9923L, 0x7ff345b4eb7f3639L, 0x804d5881b2eefef3L, 0xa15f9c2826cb34dbL,
- 0x64822b68adefa772L, 0x761e92f8d279850dL, 0xa5d049ab1061dba3L, 0x5f46fb02d10d2219L,
- 0xc1cdaa5f9ca79b19L, 0xdd713a74701ebe60L, 0x6b626ec963951798L, 0x1d3ec8d78b96d16dL,
- 0xdb885d52960e7f34L, 0xe39849cf3ea178f8L, 0xc1e37acdf807130bL, 0x3645880ebf333913L,
- 0x3af81a7bec346c22L, 0x871c563e94324804L, 0xac55fb5e2817db4cL, 0x035b04c42565ebe2L,
- 0x5094cafab11cbc3aL, 0x94d40a57481346b5L, 0x0f91a8492df723e3L, 0x126a70b84f779accL,
- 0x4409e9a5d5c3f133L, 0xb1655339864151efL, 0x6564e506d11e9de1L, 0xd9a06f7b8860b488L,
- 0x0d493e410b68b6c6L, 0x4e6fbf4b3b985a07L, 0x71c1b0ba9e52a2deL, 0x5775784ad3cb99d9L,
- 0xbab84cec312107a6L, 0xd9066f5ccd59cf9eL, 0x8c656651dbb3ed84L, 0xa7448d0059484568L,
- 0x2819237e5e8cb03aL, 0xd57eaf5239931b4bL, 0x6cd436fd5f7c1e73L, 0xf03b845f2a584931L,
- 0x8847b9f1f2d55b7aL, 0xd49a38f8e59db8faL, 0xd5052cc47685dbfaL, 0x91e060fb399ecf2cL,
- 0x5748fbea12dd2869L, 0xd0cee85adb889226L, 0xa35e9dfa5a64f56aL, 0x3118398bd0e3cbf0L,
- 0x5e650b9a3cb34308L, 0xf575ccbebf49b91cL, 0xb3f8dd73257c80e2L, 0x13d7954e8294819bL,
- 0x90b57ccd00f1591dL, 0xa8b13ef52ca7e284L, 0xe482d24e5b239833L, 0xb0648475f2b4d63fL,
- 0x847e8fc889e2389bL, 0xa8b501ee1fc59ba6L, 0x29702f6acba4379eL, 0xfaba9600f3d2cd0fL,
- 0x52ed7d9f45c6b578L, 0xa02b167546d6e2d0L, 0x9a41cb166618a390L, 0x83d464d7349d9f3aL,
- 0x805485c9d2c70c6cL, 0x332f7ce3e077ecceL, 0x1ead372c068ebb04L, 0xd6866c5b3b5eb82cL,
- 0x5b057c64bda94a33L, 0x11e1388f59653c66L, 0xffd2aca771c0abb8L, 0x2fabdd0e8e8ba606L,
- 0xe974ffd57219e5e6L, 0x2b4e5c1e5f98e506L, 0xe7819b2cb44db4c0L, 0x6cbd78c408376520L,
- 0x244285f39307f083L, 0xd152927f3a3af853L, 0x5b799885a8ba66e3L, 0x9300da64ea1a0644L,
- 0x67399bf8688a0cabL, 0x047c301af4a94bb2L, 0x6750ecdf35c8471bL, 0x7598ae5c876d4080L,
- 0x269e0cf307467534L, 0x2ef4d8dcaedbc549L, 0x2c6983c911c958afL, 0xb2fd7c07ae0bfa60L,
- 0x3220a56d67450e80L, 0x7385883420eb9f69L, 0xdb1fd2951f15b047L, 0x0f08b35df55977bcL,
- 0x42939b9f2e58127eL, 0x4d1d77e72414aa9aL, 0xfd8137f8b59bd084L, 0x167cc7f46a511504L,
- 0x0263de0c6b50290dL, 0x2a1c2feb488ffab8L, 0x1194815038360d85L, 0x36374630d0ecb4e8L,
- 0x609d38e22c59a974L, 0xee23867f7c9b5f54L, 0x40e53a7804b0ef15L, 0x8f287f1a3be6e458L,
- 0xba7334b0f0af9e75L, 0x09f003e8e0e9c6c0L, 0xc02dd0d35c42bc56L, 0x63dca83acd6be04aL,
- 0x9617b58a79fdd826L, 0x563d25e6f891bb33L, 0xe3c3d3f3f6d58588L, 0x359977baa315b1b4L,
- 0x0df431301d9e6bc5L, 0x4074bb10d0003ca5L, 0xf440159140f2b453L, 0x3a6cc6e14820f5e2L,
- 0x4b352bdacf3a37c4L, 0x9ef3b8df89ea4c29L, 0x8a1b2495a1414892L, 0x670b7f423f78b7c9L,
- 0x7513c7ccf6ee3c3aL, 0x9ba96cb53c24408bL, 0x3316c3dc4ec859f0L, 0x501337e1a7f1e218L,
- 0x9a1544a6029c1eb5L, 0x9b43b15859c3e96fL, 0x058011e22698bd4bL, 0x589b8eaea60d54a4L,
- 0x68ccb8c6cd7ec24dL, 0xe55beb5896455705L, 0xba6069cf90a8f1e2L, 0x896a18c3eb90a6d6L,
- 0x870d3d80ae0b9323L, 0x48688d8b457f501bL, 0x8f1a8c1b84b3ba62L, 0xd1b7b64dc136f6b3L,
- 0x3c6a7025428547e9L, 0x199bcc50a190fb6fL, 0xa5de0eed4bda0979L, 0x31041667821cddb5L,
- 0xe9df34e2678fb4e3L, 0xdd7222eaee54e524L, 0xaae6488b26c7af56L, 0xe8a560dbbd2eb6b3L,
- 0xe37c99a7f5defceaL, 0x1572be8d78f3afacL, 0xf69ffb64131633aeL, 0xa837ae34963616fbL,
- 0xaf0a9f03d137c170L, 0x0d3e02b464018a48L, 0x11753aea03bb0ecdL, 0x32d9cca610dceb34L,
- 0x2622bb6a6e7a11e3L, 0xdc99a44c515ec8b3L, 0xd7d720ad0a770b28L, 0xe322f742d6d051c2L,
- 0x745f2b6e3ea9cd2bL, 0x951f21478e6b9662L, 0x227f21d8c0713385L, 0x0cb729235e6876eeL,
- 0xd323b857d9721a53L, 0xb2f5f599eb743346L, 0x0efb30babe65a283L, 0x94c1190da321d470L,
- 0x117c63209fba9efeL, 0x738cf92baa4bc2cdL, 0xc3bdd29b33277165L, 0xd78a2fab38f6dc46L,
- 0x35c44aafdefb91e2L, 0x321e26bf321fb60bL, 0x12db436288b37172L, 0x158a2d49e51c261aL,
- 0xc9202ac8ba71c873L, 0xd02fa93dc97cc7b7L, 0x1f8bd11b747e901eL, 0xf7a17b2f74aa321cL,
- 0x284d02d7552a3e90L, 0xeb86a8251533c574L, 0xb3fd774eaf4e77f8L, 0x31df2951c3ff37b1L,
- 0x86e38546195a69e7L, 0x6737aaf165a1389aL, 0x2e2e925079feee0fL, 0xf7bd5a988596c1bbL,
- 0xccf835db6a10d2dfL, 0x6f42700f37c94701L, 0xa6e86f7ba2779a5cL, 0x0a43a4f7036d1ec2L,
- 0xd798bd6d52ad26daL, 0x218f6912af38b818L, 0xd48684f266f2e186L, 0x8f675048b7b012e5L,
- 0xe5e469aac68eaf1dL, 0xe2740035697de79eL, 0xc22d6bd6d08baf1dL, 0x341774636bdc8f41L,
- 0x7dfc6b73f7ba322bL, 0x7566343607bb525bL, 0xae94d116ccf1e74bL, 0x6ca1b59934cc2697L,
- 0x4c2fb1c45b749cedL, 0x989999bbdd2ec893L, 0xcc4e27afa81bc8a8L, 0x6ddadf15ebf85830L,
- 0x38fa9cb2ce72bc16L, 0xacdaffe39db4bbdaL, 0xbcc4682ebd095d93L, 0x483f539d354559adL,
- 0x45de92e997e2915cL, 0x7ec5c881c5344a55L, 0x9d1844fffa091545L, 0xcd9b08d4dcda27baL,
- 0x1f7495a5f36c34ceL, 0x4f0fc9647d99afd7L, 0x5ac375ec59321cf2L, 0x5c07ce6df7e1d9a2L,
- 0x49f211880d688b4cL, 0xf85fdd8ccad0867aL, 0x7d510164d8f197a8L, 0xc64108c5732cfa0eL,
- 0xb262d660d3a2c648L, 0xd5d5614571dd2efaL, 0x0ec1a6d0dd5d5391L, 0xbf07d939d2535f02L,
- 0x035bce3021e51045L, 0x423ae115ec99d154L, 0x22ea1d3abd893838L, 0x517fc1107eaa6a83L,
- 0xc5967cdf353aeac6L, 0x096ae2c3dff65ce6L, 0xab1b908b97dc911bL, 0xf3d84c286f22611cL,
- 0x256823815030d8a2L, 0x3bd9b119887342e4L, 0x59926f3401f437d4L, 0x74edf41038d3986fL,
- 0xe2b35bf615038253L, 0x4d09740a6b44db89L, 0xa37edaf089c0eeabL, 0x8263ba2c23e2d62dL,
- 0x8784aff57d390c3cL, 0xfb49ab0635d66c3aL, 0xdeba73c2562bff1cL, 0xe2e6bf8cb6e29717L,
- 0x0e70431c63d86e46L, 0x20d717e16aae6010L, 0x031af57cdcf2cd36L, 0xd55fbeef1c5357feL,
- 0xd361d871f4e393feL, 0xb3416e718d32d214L, 0x7b351f93f909fc00L, 0x16916de7b96a26bdL,
- 0x4fec1248b5dedb65L, 0xfae1aa9a62bfa096L, 0x92e7910a6b0084a9L, 0xd12bba8672e8aaa9L,
- 0x316558d69efc8f6bL, 0xb0dde29eb96fee87L, 0x2125a2be5bf67eb3L, 0x5905903f46531fe4L,
- 0x2a9927e8175ff60fL, 0x794376f2bb5d6d96L, 0xfa9f65d2b4848b12L, 0x2b92665a263a5091L,
- 0xabcaccfab8464c65L, 0x05b2fb2a46d1a0bdL, 0xa879920d28c0d54cL, 0x50394088a8ea4953L,
- 0x61b0c87f0084129dL, 0x29ebcd1078d6e2b0L, 0x2440c652f6bacf89L, 0xbd74d596cf4c8eb1L,
- 0xe4b009e5c334766bL, 0x07db26843cf72cb8L, 0x4171d5edd5468876L, 0x608d5c2c348c143cL,
- 0xa19e0a2b81da6eb5L, 0xb65a7be9354c1390L, 0xf4f4c437cb9bb324L, 0xfc24806650c823bdL,
- 0x4c2331521e7f2966L, 0x54f66e42eb73bafeL, 0xf06c11f3d2fe29aeL, 0x8ba8d0f28cbb0fcbL,
- 0xf3617850d1ae7976L, 0x96463b47cd9a7286L, 0x8edc2133b35c3779L, 0xae43f70f181d9371L,
- 0xe7628d75c9a3c2e7L, 0x978499ba4193b333L, 0x99bb4bf79b0a46c1L, 0x4c52676d7e4d0a58L,
- 0x2064ee3910693deeL, 0xfc43514d16633997L, 0x1bc1741ce05c4cceL, 0x6e9588d40f3396f6L,
- 0x146fe816bb3a3708L, 0x2b3db8ee05eefa87L, 0x6ec21a91189ec0c0L, 0xa8a907b34108faf1L,
- 0x708b80912235684fL, 0x2bc8ba70edfe680cL, 0x4d118826481266efL, 0x8f93a3a5de887175L,
- 0x3308e9133a950fe3L, 0x939ed8b0d7e91f87L, 0x666beee64002b6b0L, 0xc8f129ec69ce7811L,
- 0xd57593c68ce93ea0L, 0x02d6a3e66edcc862L, 0xbe1d00d16a2271a6L, 0x34fbeaf95e0c673fL,
- 0x9845ab59483a0e86L, 0x257d47d5abf88962L, 0x28af39f39319545bL, 0xe3fce03abd8171eeL,
- 0xa4c5f606dccc96f1L, 0x4d414846267c4962L, 0x6ccf77f81d9dbf70L, 0x947bf43c729a71ecL,
- 0xfd656c39c4fa824cL, 0x8f652cf2d1e04fd6L, 0x8cb11929a65b6aeeL, 0x094948f16a8064daL,
- 0x7434e703a4d03d5fL, 0x9361d3f63af4aa35L, 0xa998c1eeec3fb422L, 0x51eb94754b5992a2L,
- 0x6e109c0347ef6979L, 0xe3c9738d67c582e2L, 0x9c735e3857ec57bfL, 0xbe6415659e12c64bL,
- 0x73924584e31b9099L, 0x8f676821e60b0945L, 0x5614e3a695d5289dL, 0x7ecd448787517ebaL,
- 0xc96db02038dbaf5bL, 0x069299ed774fa6c8L, 0x0b4ace5a8ea16ac8L, 0xbf2f4f23a6c92295L,
- 0x90bdc4f1e931656cL, 0x7cd5b0b95ac34d3aL, 0x2032bc59d3dc1710L, 0x702c1a0cd5609379L,
- 0x609d33abc01ff3feL, 0x8ae5d8f283b2748bL, 0x2cf3778fa7eaae1dL, 0xe8a0d7b1919df9e3L,
- 0xe487894f6d602a0bL, 0x929858549609626aL, 0x46e540cd86bf46e7L, 0xd1daf4382128d9eaL,
- 0xc47239c06b22ef75L, 0x8b7aad8ffea1b991L, 0xd6c1d2e315273fa0L, 0x2fda11cd74177e6bL,
- 0x333cb0a145919fd7L, 0x5970b31a49f37b16L, 0x7890bc68793bb959L, 0x2a060f45a1719347L,
- 0xeb298f0264bf379dL, 0xd7c4fd7921707400L, 0x374635e7713ed165L, 0xc60c008df0296d05L,
- 0xbf13739a8d3c7dbbL, 0xbfb945ef1cf94d1dL, 0x75fe953c3a3a8315L, 0x09f83064f4150c02L,
- 0x6784a3b452055343L, 0x73ed26d185738f51L, 0x6c59094e8c998390L, 0xeade93e19d60d4b5L,
- 0x8cf7cc8e62bc869dL, 0x22f85626f7f69298L, 0x6679c449ac22edc0L, 0x7017d0003e897435L,
- 0x308fc450a6c62bf8L, 0x2578b45bc6f34cabL, 0xcbb936c9d253db39L, 0xc4e70e5bbc5e002cL,
- 0x29db6985be6c9459L, 0x96afe876f5f6250cL, 0x829f766f138f95e6L, 0x4369632017c8fa0dL,
- 0x0da90c817ca890a2L, 0x38d160dd675e2376L, 0x20df15ad986408eaL, 0xd192623c3d9b3f41L,
- 0xd846f79123baf4aaL, 0x6cb058a0edfbf056L, 0x1b192f0be8dc77a7L, 0x3a11b3dfcc81a441L,
- 0xe914410093ad7767L, 0x3126257e578bdf60L, 0xd5d5e470410cb6eaL, 0x4e1bf5d4209248aeL,
- 0xe1e4c2924f35192eL, 0xac9944825cb7ef5eL, 0x8d2cbe6996eb3475L, 0x1bc05d2a079592d7L,
- 0x564a9f06755e71f3L, 0x9bb767d68e9f2537L, 0xe4b045acf13978a2L, 0x4b7519cb9028ac83L,
- 0x9df655284198b85cL, 0xdc32ab4d421a2b61L, 0x4c5d7f5323c1960cL, 0xe4273ff318f5c7b3L,
- 0xd73ef5ea88a3e99eL, 0xda2ffb6a863c850bL, 0x9555a4144e05ad82L, 0x950104dc15092ebfL,
- 0x39d121a61f19dbfeL, 0xc6804e29d60d7814L, 0x7e98bec5ba17d58bL, 0x8b2c6b0e6c3b749aL,
- 0x0301a07c84aaccdbL, 0x93dee719932225a3L, 0x381611a50bac0ae1L, 0x572a8816f6e407b4L,
- 0x0420efe85aa75232L, 0xc1f53f78b9ffcf4dL, 0xbeda53bc95b96ec3L, 0x9f357114059c8eabL,
- 0xe38239260b584150L, 0xccbca17f4eed2ad0L, 0x1528080b61f54198L, 0x5b8cdc4c40d49f30L,
- 0x1617db48eb6640d0L, 0x6fed27f88a516c99L, 0x37056e05b4724179L, 0xec7bc122da9538d8L,
- 0x9fbfe01ca2c0fd57L, 0x2fc96b31dccafd9fL, 0xe26a72009daa1249L, 0xe9fb2e3998d16a25L,
- 0x4a87dc39d24133aeL, 0xd5340e98fde806deL, 0x272b62b5dd0d7fe3L, 0xca4625581bf9dbe1L,
- 0x8677af77de374a90L, 0x27dbec9e28f857edL, 0xb4aefc44d036612aL, 0xcf2e8ebdb0f6bb11L,
- 0x76023506c94e0532L, 0x864e72d4488c7a7aL, 0x0b81058fdac18fd3L, 0xdf93ee5b6674a0f4L,
- 0xdb30565511789d77L, 0xcf5fe22dc0375f30L, 0xa6e62e6e4edb4043L, 0xbce383957a728669L,
- 0xfe4dd4e9633db2c6L, 0x24e68818b2a6d6cdL, 0x048a89c5424b4cdbL, 0x7fc7bc75bbbe5768L,
- 0x79596343191e0ff2L, 0x5510b9cd8306839fL, 0xff2668b4eae7bb53L, 0xb4c03e6363c9e244L,
- 0xc9e3c0c1c015eb6fL, 0x52531f5f898a744fL, 0x0484005b2a805083L, 0x31673b70c6f23c53L,
- 0x5bffe158f323a7c2L, 0xc742bc0d0c55f125L, 0xd95c32fe7e18379dL, 0xc1f2f613ee3c2e21L,
- 0x3217a43ff0daaa0eL, 0x3a9fa27258257e53L, 0x80b42af5a393bcf2L, 0xb6967fd6a302f65eL,
- 0xfdc07bc592dbb125L, 0xcb83b8b9f64c3c3bL, 0x9cb572b041015355L, 0xc12dc512aedc530cL,
- 0xc8db824276c083ceL, 0x86923b0e2903627fL, 0x1385cf2be22827cdL, 0x21b7616ced869ef1L,
- 0xc74d497d079901e6L, 0x9e03c843bb13f658L, 0x915b89077a81ec7fL, 0x288a10b00768d244L,
- 0xd88eb6745a557569L, 0xb3c98071a3d13b20L, 0x8f23aff44d352f03L, 0x2bf39ca10e45bdbbL,
- 0x0f1bea47e2c68a4cL, 0xf8d5ab01c1ad6b55L, 0x679e0601953d1e31L, 0xd793f3aacb3c520fL,
- 0x96fc350ccdb76eabL, 0x9fa0178362df447bL, 0xc11c63febf83598aL, 0x3aa88df3a1a71323L,
- 0xab2f8338a09ca82aL, 0x32a2133050a71357L, 0xffecf97ca3ff65e1L, 0xfb6fd13318f5cb79L,
- 0x3acf76875acad366L, 0xc577ffff529f74cfL, 0x368a90182031dd12L, 0xafbf2311ad656d52L,
- 0x80cd4f9f23fcafddL, 0x451717a061972d1fL, 0x0bbcbdae779cfbf3L, 0x133ca541293fd40dL,
- 0x6f241a21fc40b108L, 0x9adecbcf0c28110bL, 0xfab528d93bac6d3aL, 0xf4ea3d459b0654aaL,
- 0x7e2e9ef35a5aafbaL, 0x28730469eded0fc7L, 0x3cbae97a12632fbeL, 0xded6960c0be007a8L,
- 0x2a11758a7c52c43eL, 0x289de4875bda262dL, 0x6e13eea58caf3fa7L, 0x020c8ed0d5d673c1L,
- 0xdb4b3e7719d523b6L, 0x49143c819d111fc3L, 0xe07479f9ddf45d8eL, 0x68f4654bcc07435bL,
- 0x513bd537af510064L, 0xcf956c3a3933ba38L, 0x97e1eaa33f88eeccL, 0x18be860a2504a1c5L,
- 0x84408412fc0bf397L, 0x0b6bdba7e154bdf7L, 0x1d8f8b446b544be6L, 0x6f06b3dcdef17a03L,
- 0x30c6e14df59f8cefL, 0x01c97ba9910219cfL, 0x33ddcc087d1aeb5cL, 0xe31b94300cfbcbcfL,
- 0x0adeb8a98786bb28L, 0x3f69d5b0e3ec8f17L, 0x99f5a15f635296a6L, 0xce9fac7526862e86L,
- 0x3a88964201bd7524L, 0xec94d643ea71be51L, 0xc4257084d97ab1c5L, 0xf369b10a73b4d382L,
- 0xac02bb473dbc5fd1L, 0x4fe73a86d95d7222L, 0x858806616fe3d553L, 0x10680debcb0693e4L,
- 0xcaa9aac77c954093L, 0xf29c7530415d71e5L, 0xc32b319e09de9e48L, 0x1c67107ed497ebc4L,
- 0x731da71593324021L, 0x49774770588c055aL, 0xf978dfdc28084220L, 0x058b3f2780b5a7ecL,
- 0xe4ebf2ca21410715L, 0xd3841ed97708421fL, 0x0dbc9401dc51eb4eL, 0xf47a96de499aa2e1L,
- 0x224da94d8542ba0cL, 0xa3426a80b4dd0a4aL, 0x857caef48ef7e5b6L, 0x11356ad6ede44bf5L,
- 0x1a32471bd26acd7aL, 0x199396e31de7b358L, 0xb7ca7950dbbb4a92L, 0x6ab23720409790a7L,
- 0x2abfdb93a3159d10L, 0x23913b403946c4a7L, 0xac7c9f339a822344L, 0x12cffe9625cbe744L,
- 0x89558b98548b1946L, 0x77be65945c191139L, 0x3ba8d1fc701f4347L, 0xb143664560327f20L,
- 0x48baccc3ef2081ffL, 0x450c379d24beb8e9L, 0x1990b609485db827L, 0x6c6a565d7129ccb4L,
- 0xf9724a82872bd619L, 0xcfe629aa56717e20L, 0xfde48d87e844ec93L, 0xb32f79e5dc9ce4c1L,
- 0x7c9d88364238519fL, 0xe943aceba65150f9L, 0x5301e8550cbdd076L, 0xabb8392364453b3cL,
- 0xdfb4b4a3cf84aa2dL, 0x269e45f7a6b48a42L, 0xd6783043ab383fcfL, 0xe4ec475d296a69e5L,
- 0xe2e273ef65555361L, 0x6bd3084210a75af7L, 0xf2ebc493b909d8c7L, 0x4d20f3d435e9bc94L,
- 0xa465e41c3c36d433L, 0xc1b259456f4341c0L, 0x260093703d6cf2ebL, 0xda68d9dea0aa9bdaL,
- 0x5662a12a210b2a47L, 0x54675bd1a1b4b467L, 0x9dbd416302ec2468L, 0x3c7130a5032d823aL,
- 0xabfdef2d9a4fd92fL, 0xd4034e276021451fL, 0x13834d3d0e43ab73L, 0xdc181442b438b2d6L,
- 0x1736ffb392c25e23L, 0x289b94003a946252L, 0x99705629b221ca37L, 0xa7b22a5bb26775d6L,
- 0x2dc12f9f04435661L, 0xaadd48b556bc9e7cL, 0xf6992e8e94b68a49L, 0xd50420466c9456e3L,
- 0x0ea8305ecdfb1266L, 0xfe0b1d7e4f0ef297L, 0x563de834c4e56a46L, 0xc62b8099b5b264c6L,
- 0xf6e76aeaf533c784L, 0x0d4680470b790968L, 0x288a50754707431eL, 0x8ad167ed38df547eL,
- 0x9052fed81a8ca4faL, 0x5975ac56f0548ef1L, 0x588bf7d0130111aeL, 0x9ec02036a6688a24L,
- 0x8c9a454af9e09984L, 0x333ee6727bd12dcbL, 0x9847468f925dc38cL, 0x446ed5203696abacL,
- 0x71fddf9ef5b5def6L, 0xd4d61614cc333541L, 0xd08a0694cd7f72a7L, 0x686cfe3ea1889281L,
- 0xf039404e0dd3333fL, 0x052c620eb18b4246L, 0x4e4de47f86d84713L, 0xfe0450396b209851L,
- 0x99d6e893b01ed92bL, 0xd94cf8705f8eba86L, 0x763451110c00291bL, 0xdf4f60b9aa45d064L,
- 0xf473d4bfd86ad526L, 0x41b9e3fa1a6dba94L, 0xbaa7cdeb00796a4aL, 0xf668194c40626450L,
- 0xb894e0ae40a9c87fL, 0x5bc1eea8587d3ddbL, 0xc4c0ecb91bb50d75L, 0x819fdfd17ff2917bL,
- 0x681484e54b6b12f7L, 0x2f510aa2f8977995L, 0x7d1582a293b8fa3dL, 0x3dad5a0f0da45470L,
- 0x33c113aefb480520L, 0xbd524b2da7ce6c1fL, 0xe4cc051d00d8ddc0L, 0x2995950e206efa90L,
- 0x8b0e5dca588e3f50L, 0xaabb3583f7f87082L, 0x75dbbecfa34cb4d6L, 0xf195977068849ae8L,
- 0x9223ca6fbb72767cL, 0xda7211029d59f04eL, 0x18d9987c6566405cL, 0x57833aa39ef75a04L,
- 0xd1750e36481f654bL, 0x0ce2b66bc8796acbL, 0xc7e79aa76c96b057L, 0x68f95b6b3c5cdc1dL,
- 0x2f5725cf5fc583aeL, 0x6b973013fd4484a6L, 0xaaeb2687f2d8bb96L, 0xad29cce061ba3934L,
- 0xcb60dd1c437eb1d9L, 0x5cd6f46b78181bb4L, 0x1561cdc95ace24d9L, 0xbb774e6705806245L,
- 0xdc29c8df29b2e975L, 0x6ee5ba502839dccdL, 0x670869bb64c60f69L, 0x008ca2931e927ae7L,
- 0x35cf6c0a27d8de77L, 0x94a3d86209af3920L, 0x4095a276475df5b7L, 0x1119e4c257ccf7fbL,
- 0x33376166d9064fe8L, 0xd68c2399f968b905L, 0xb7bf2902f40fc101L, 0x4ec18604cfd551e0L,
- 0xeb8e7fe1b6678e99L, 0xdcfe68fc0e042fa6L, 0xd2e58dfb1a8e3866L, 0xf4322bc57fb9a35aL,
- 0xe0c665c8cf1fb49bL, 0x60de1f1050684297L, 0xf400c04cb00784cdL, 0xfc2a216f12016984L,
- 0xa808b477fd65fb4aL, 0xd9b614adfcb5d0f1L, 0x50afdbc66e3efad2L, 0x82337b3f1764851cL,
- 0xdc98850eb93ef45eL, 0xe1c314bbc2c6af27L, 0xd35614ba27e74a71L, 0xa5d592e04a31bb6fL,
- 0x3f143cd0bc243fbeL, 0x081641ac25408b21L, 0xd4166b32a26fc1c6L, 0xccd088ee4d4a1f67L,
- 0x698c913d46c1ec99L, 0x0f6b9086a5b986abL, 0x4a73c05ef72e3595L, 0x0307aeeb350ab081L,
- 0x43e20045bcb06b0eL, 0x3f58d1d6cd3aa0dcL, 0xd71cd7c996faba80L, 0x4431d8268eebfb71L,
- 0x254246df109e3dd5L, 0xa7ca1449a238b06aL, 0x49b40e7b082493e7L, 0x45d80e6bd330d613L,
- 0xaf3d8a578b6d6232L, 0xa4b98341785262d1L, 0xf4f1f424af963102L, 0xa84a986395146774L,
- 0x90da037fb61d5c88L, 0xb645534b2cf5b89fL, 0x3fdb3073310934b4L, 0x1a0307d01f57f514L,
- 0x509c9b87a4a1e66cL, 0xbf320cf0888d8aa8L, 0x45a51f76c5f76892L, 0x23eb7a2b99a64402L,
- 0x4c600e5675dd7757L, 0x4896757aa01a5c34L, 0xb808dbbda7a8a1daL, 0x762c21058ba50349L,
- 0x99b0a9d5deeebb37L, 0xd6d98ef70a1e465dL, 0xb052f2c1163894f6L, 0xc55e73526f8bc8faL,
- 0xb31a0537f5b3b269L, 0xf09c1819c0c7f78aL, 0xc36d4e2187e430f8L, 0xf141831a47299c7bL,
- 0x62f938047903ef34L, 0xf2a0dd678f92e0a5L, 0x0c7fe6a53efaaa65L, 0xcc539fcdcc466310L,
- 0x55199357cdc55491L, 0x6917fb45babb399eL, 0xb098da3c7b012b1aL, 0x054916438f426c41L,
- 0x1a5ff3356d77d43bL, 0x74e71995e0aacf1aL, 0x6562a8da6b5e69eeL, 0xacbc2b8d1fb16ea8L,
- 0x400ea8e1f3f5535eL, 0x2ea792dad3a4538fL, 0xf580fe481db60b5cL, 0xcb101198dd0aba9fL,
- 0x259acbe0461cb837L, 0x30033c3964b56a40L, 0x6c15d4283eeb6fa6L, 0xdea7b626998ea3eeL,
- 0xdbb2e1b8c0c2abdbL, 0x3a856a6742b6edc2L, 0x0777ed6b1683f48bL, 0xde72fd7d6db3bb63L,
- 0xc8766969b599dc68L, 0xb39a5b76dce26160L, 0x97464948ce81d8a2L, 0xae20fda5af404ae6L,
- 0xde1100c4f1ae3265L, 0x05a94d43bf60f574L, 0xc087a2116f52d0fcL, 0xfacb3be87e615d89L,
- 0x0e184cb9fba7b0feL, 0x824779bede6d84ffL, 0xa0852e96875da152L, 0x620046e8ba89baefL,
- 0x247c32c5f34b08ddL, 0x49294468356e7298L, 0xaf6d6e0f8b5009ebL, 0x8c25bfcdb8abd77fL,
- 0x4f5464a1bc417e38L, 0x2df8fbe8993f8c9fL, 0x6540566281dd6d91L, 0x0b90690dcfb03a83L,
- 0xe270b7c7f8fab463L, 0x898ead41792a7f87L, 0xa1b1248822b7c292L, 0xfa2c0d61dd383eabL,
- 0x5574c091830bd677L, 0x43640e20702986e5L, 0x622d0a1c860d0302L, 0x9528ea0051990eb9L,
- 0x28f057ef30af388fL, 0x88320e974a2721a0L, 0x8a12cb33cdd88b60L, 0xd91a9763f991780dL,
- 0xdf22e332867c0e97L, 0xad95801b6c801f10L, 0xb34e21d4afe2c4a0L, 0xd5465bf172494dd3L,
- 0x16594af34f1b5767L, 0xa675dceaee1591e6L, 0x53db891db5e1d768L, 0x39a80f5d365c71afL,
- 0xdce01c73eac54372L, 0x1087fb03e5ce69e9L, 0x067cac3905594378L, 0x275d24c9aa1607f0L,
- 0x9163a77a53e361b8L, 0x17d10f8254fa7f0bL, 0x49efeab6642e9e45L, 0x376e24839b1df1beL,
- 0x0c46221cc408546fL, 0x98eb5bb7001ebf5cL, 0xc6c4d56e3c9a78efL, 0x023c0723e123a899L,
- 0x145912ec44b57548L, 0x488a34fe824ff4c3L, 0xac3bc6de9929c707L, 0x1dbac6e98813a70fL,
- 0xf566054941858266L, 0x18e0a3a2a8b8f2f1L, 0xcc6245a26564a399L, 0x14416ca0e1a84a9aL,
- 0x4eaf095631a6e7bfL, 0xf2f89f104c9d0b8dL, 0x8fb278a5953e52d8L, 0x8fcee83a30a8be30L,
- 0xb66850da1a0ceb33L, 0x5f37d31bad76f4dcL, 0xff4d956ffea8dea4L, 0x078c583b396635b3L,
- 0xad268fb5b1105028L, 0xa480149a0dcbc5f4L, 0xb0e8d69c8b15c864L, 0x6ed49c46f19bb8eaL,
- 0x7f1871fdf321818dL, 0x1ec5816f5a9843eaL, 0x77c8da91b5313675L, 0x4cdb66ad515e0717L,
- 0x2ec4712b0bfdfcd6L, 0x6c6f5767fff27330L, 0x071083b972d80c0cL, 0x8d8325e82c4fdcdcL,
- 0xb47a658dad8e13a4L, 0x88710bf005fda027L, 0x69bd3edaf7111200L, 0x0dccdd0c65c810ffL,
+ 0x64d79b552a559d7fL, 0x44a572665a6ee240L, 0xeb2bf6dc3d72135cL, 0xe3836981f9f82ea0L,
+ 0x43a38212350ee392L, 0xce77502bffcacf8bL, 0x5d8a82d90126f0e7L, 0xc0510c6f402c1e3cL,
+ 0x48d895bf8b69f77bL, 0x8d9fbb371f1de07fL, 0x1126b97be8c91ce2L, 0xf05e1c9dc2674be2L,
+ 0xe4d5327a12874c1eL, 0x7c1951ea43a7500dL, 0xbba2bbfbecbc239aL, 0xc5704350b17f0215L,
+ 0x823a67c5f88337e7L, 0xd9bf140bfeb4c1a9L, 0x9fbe3cfcd1f08059L, 0xdc29309412e352b9L,
+ 0x5a0ff7908b1b3c57L, 0x46f39cb43b126c55L, 0x9648168491f3b126L, 0xdd3e72538fd39a1cL,
+ 0xd65a3663fc9b0898L, 0x421ee7823c2af2ebL, 0xcba3a4b69b6ed152L, 0x0348399b7d2b8428L,
+ 0xbdb750bf00c34a38L, 0xcf36d95eae514f52L, 0x7b9231d5308d7534L, 0xb225e28cfc5aa663L,
+ 0xa833f6d5c72448a4L, 0xdaa565f5815de899L, 0x4b051d1e4cc78eb8L, 0x97fcd1b4d342e575L,
+ 0xef6a48be001729c7L, 0x3982f1fa31afeab8L, 0xfdc570ba2fe979fbL, 0xb57697121dfdfe93L,
+ 0x96524e209b767c29L, 0x55aad0ebca994043L, 0xb22687b88856b63eL, 0xb313b667a4d999d6L,
+ 0x07c7fa1bd6fd7deaL, 0x0ee9f4c15c57e92aL, 0xc5fb71b8f4bf5f56L, 0xa251f93a4b335492L,
+ 0xb9bad7f9e5b07befL, 0x62fc9ac35ccde7aaL, 0x933792382b0218a3L, 0x7d497d2f7a15eaf8L,
+ 0xb2f0624214f522a2L, 0xd9895bbb810ec3d6L, 0x22d91b683f251121L, 0xc8fe9a347247affdL,
+ 0x3462898a2ae7b001L, 0x468bc3a10a34890cL, 0x84ff6ce56552b185L, 0xed95ff232c511188L,
+ 0x4869be47a8137c83L, 0x934606951e6fcd81L, 0x1ab5e8e453bde710L, 0x6386b61b30fa1157L,
+ 0x97f3a778e242d0cfL, 0xd870d281b293af3dL, 0xc3a5f903a836fafdL, 0x088bd6a24d49cd77L,
+ 0x4e38ddc2719162a5L, 0xf48286b4f22cad94L, 0x080f6f650c337557L, 0x05e6daf6aae1ad59L,
+ 0x7450f7229f336762L, 0xb75b43fb4c81784aL, 0xebd37a514f153148L, 0x0d4b3a39e0bc52c7L,
+ 0x562f36fae610a2e1L, 0x0e0e413e555bd736L, 0xd452549efe08402dL, 0xf2e2ff7be2c75e21L,
+ 0xf2385606c18aaf0dL, 0xdb609b507d8c6b8bL, 0x74ac5663c6c4f45bL, 0x0d84c9a356858060L,
+ 0x19d5b3643bc029b6L, 0x0dd8131e97ffc842L, 0xfa7303606bfffc05L, 0xf98c6d63ff48a16eL,
+ 0x34df46aa2d610767L, 0x83490ef054537f7eL, 0xe071f833e55ebfe6L, 0x0d4b94537ed4a6aaL,
+ 0x3cf85e4e333966fdL, 0xba15364649384016L, 0xc0e6bd623ca72405L, 0xdae6e879b8eab74aL,
+ 0xe4a41f17e70d3e0aL, 0x56e10c00dd580f70L, 0xa9a66bb41781d872L, 0x58e42dbdffe21573L,
+ 0x69450e1ce9674e6aL, 0x47fe345a350aa605L, 0xac958aa80455a5a4L, 0xbc1abca3fbeeb2f3L,
+ 0x08f760d9228900a4L, 0x9e1eb8a2dfec4387L, 0xe91bd1321f5fdc89L, 0xda11a24c514b9dc7L,
+ 0xb1f63d976e0e639bL, 0x41c11098f6123861L, 0x3d7736979f978f68L, 0x0820685b38c926beL,
+ 0x0e8c3dcab075b112L, 0x5e37299d89089ba4L, 0xa1f735eb8235b32fL, 0x2289d719e7b146eeL,
+ 0x1c9c9d0284d96719L, 0x5f8b358546775be8L, 0x317e34c009a07a39L, 0xb16b073eb0ee0a19L,
+ 0x423b36fd459f2a66L, 0x5f45053666f3f84fL, 0x63e7074f03c73d92L, 0x22080cf23288e895L,
+ 0xba4e71bf61dac16fL, 0x9643b3707db2cfb5L, 0x98e2db6c665e7178L, 0xcbc57de0ef3eabb6L,
+ 0x6239a2197582a8a8L, 0xf2ae968e55fda13dL, 0x36e7ac11d1f3a617L, 0x508f0acb609bd756L,
+ 0x6f42d435193a1ac2L, 0x2df2cab9d65e0b00L, 0x4584c1fde5f1ad55L, 0x602c500bdc8317c2L,
+ 0xc80d5b04f6337337L, 0x98abcf971892a773L, 0x5d33cf557e6c4475L, 0x05b5a78be74ccd40L,
+ 0x3ec2cce5290785f4L, 0x2eef1e9c4b36828bL, 0xdd274241a0ce8c55L, 0x3c4cb919b35c221cL,
+ 0xc1fd68d779db9923L, 0x7ff345b4eb7f3639L, 0x804d5881b2eefef3L, 0xa15f9c2826cb34dbL,
+ 0x64822b68adefa772L, 0x761e92f8d279850dL, 0xa5d049ab1061dba3L, 0x5f46fb02d10d2219L,
+ 0xc1cdaa5f9ca79b19L, 0xdd713a74701ebe60L, 0x6b626ec963951798L, 0x1d3ec8d78b96d16dL,
+ 0xdb885d52960e7f34L, 0xe39849cf3ea178f8L, 0xc1e37acdf807130bL, 0x3645880ebf333913L,
+ 0x3af81a7bec346c22L, 0x871c563e94324804L, 0xac55fb5e2817db4cL, 0x035b04c42565ebe2L,
+ 0x5094cafab11cbc3aL, 0x94d40a57481346b5L, 0x0f91a8492df723e3L, 0x126a70b84f779accL,
+ 0x4409e9a5d5c3f133L, 0xb1655339864151efL, 0x6564e506d11e9de1L, 0xd9a06f7b8860b488L,
+ 0x0d493e410b68b6c6L, 0x4e6fbf4b3b985a07L, 0x71c1b0ba9e52a2deL, 0x5775784ad3cb99d9L,
+ 0xbab84cec312107a6L, 0xd9066f5ccd59cf9eL, 0x8c656651dbb3ed84L, 0xa7448d0059484568L,
+ 0x2819237e5e8cb03aL, 0xd57eaf5239931b4bL, 0x6cd436fd5f7c1e73L, 0xf03b845f2a584931L,
+ 0x8847b9f1f2d55b7aL, 0xd49a38f8e59db8faL, 0xd5052cc47685dbfaL, 0x91e060fb399ecf2cL,
+ 0x5748fbea12dd2869L, 0xd0cee85adb889226L, 0xa35e9dfa5a64f56aL, 0x3118398bd0e3cbf0L,
+ 0x5e650b9a3cb34308L, 0xf575ccbebf49b91cL, 0xb3f8dd73257c80e2L, 0x13d7954e8294819bL,
+ 0x90b57ccd00f1591dL, 0xa8b13ef52ca7e284L, 0xe482d24e5b239833L, 0xb0648475f2b4d63fL,
+ 0x847e8fc889e2389bL, 0xa8b501ee1fc59ba6L, 0x29702f6acba4379eL, 0xfaba9600f3d2cd0fL,
+ 0x52ed7d9f45c6b578L, 0xa02b167546d6e2d0L, 0x9a41cb166618a390L, 0x83d464d7349d9f3aL,
+ 0x805485c9d2c70c6cL, 0x332f7ce3e077ecceL, 0x1ead372c068ebb04L, 0xd6866c5b3b5eb82cL,
+ 0x5b057c64bda94a33L, 0x11e1388f59653c66L, 0xffd2aca771c0abb8L, 0x2fabdd0e8e8ba606L,
+ 0xe974ffd57219e5e6L, 0x2b4e5c1e5f98e506L, 0xe7819b2cb44db4c0L, 0x6cbd78c408376520L,
+ 0x244285f39307f083L, 0xd152927f3a3af853L, 0x5b799885a8ba66e3L, 0x9300da64ea1a0644L,
+ 0x67399bf8688a0cabL, 0x047c301af4a94bb2L, 0x6750ecdf35c8471bL, 0x7598ae5c876d4080L,
+ 0x269e0cf307467534L, 0x2ef4d8dcaedbc549L, 0x2c6983c911c958afL, 0xb2fd7c07ae0bfa60L,
+ 0x3220a56d67450e80L, 0x7385883420eb9f69L, 0xdb1fd2951f15b047L, 0x0f08b35df55977bcL,
+ 0x42939b9f2e58127eL, 0x4d1d77e72414aa9aL, 0xfd8137f8b59bd084L, 0x167cc7f46a511504L,
+ 0x0263de0c6b50290dL, 0x2a1c2feb488ffab8L, 0x1194815038360d85L, 0x36374630d0ecb4e8L,
+ 0x609d38e22c59a974L, 0xee23867f7c9b5f54L, 0x40e53a7804b0ef15L, 0x8f287f1a3be6e458L,
+ 0xba7334b0f0af9e75L, 0x09f003e8e0e9c6c0L, 0xc02dd0d35c42bc56L, 0x63dca83acd6be04aL,
+ 0x9617b58a79fdd826L, 0x563d25e6f891bb33L, 0xe3c3d3f3f6d58588L, 0x359977baa315b1b4L,
+ 0x0df431301d9e6bc5L, 0x4074bb10d0003ca5L, 0xf440159140f2b453L, 0x3a6cc6e14820f5e2L,
+ 0x4b352bdacf3a37c4L, 0x9ef3b8df89ea4c29L, 0x8a1b2495a1414892L, 0x670b7f423f78b7c9L,
+ 0x7513c7ccf6ee3c3aL, 0x9ba96cb53c24408bL, 0x3316c3dc4ec859f0L, 0x501337e1a7f1e218L,
+ 0x9a1544a6029c1eb5L, 0x9b43b15859c3e96fL, 0x058011e22698bd4bL, 0x589b8eaea60d54a4L,
+ 0x68ccb8c6cd7ec24dL, 0xe55beb5896455705L, 0xba6069cf90a8f1e2L, 0x896a18c3eb90a6d6L,
+ 0x870d3d80ae0b9323L, 0x48688d8b457f501bL, 0x8f1a8c1b84b3ba62L, 0xd1b7b64dc136f6b3L,
+ 0x3c6a7025428547e9L, 0x199bcc50a190fb6fL, 0xa5de0eed4bda0979L, 0x31041667821cddb5L,
+ 0xe9df34e2678fb4e3L, 0xdd7222eaee54e524L, 0xaae6488b26c7af56L, 0xe8a560dbbd2eb6b3L,
+ 0xe37c99a7f5defceaL, 0x1572be8d78f3afacL, 0xf69ffb64131633aeL, 0xa837ae34963616fbL,
+ 0xaf0a9f03d137c170L, 0x0d3e02b464018a48L, 0x11753aea03bb0ecdL, 0x32d9cca610dceb34L,
+ 0x2622bb6a6e7a11e3L, 0xdc99a44c515ec8b3L, 0xd7d720ad0a770b28L, 0xe322f742d6d051c2L,
+ 0x745f2b6e3ea9cd2bL, 0x951f21478e6b9662L, 0x227f21d8c0713385L, 0x0cb729235e6876eeL,
+ 0xd323b857d9721a53L, 0xb2f5f599eb743346L, 0x0efb30babe65a283L, 0x94c1190da321d470L,
+ 0x117c63209fba9efeL, 0x738cf92baa4bc2cdL, 0xc3bdd29b33277165L, 0xd78a2fab38f6dc46L,
+ 0x35c44aafdefb91e2L, 0x321e26bf321fb60bL, 0x12db436288b37172L, 0x158a2d49e51c261aL,
+ 0xc9202ac8ba71c873L, 0xd02fa93dc97cc7b7L, 0x1f8bd11b747e901eL, 0xf7a17b2f74aa321cL,
+ 0x284d02d7552a3e90L, 0xeb86a8251533c574L, 0xb3fd774eaf4e77f8L, 0x31df2951c3ff37b1L,
+ 0x86e38546195a69e7L, 0x6737aaf165a1389aL, 0x2e2e925079feee0fL, 0xf7bd5a988596c1bbL,
+ 0xccf835db6a10d2dfL, 0x6f42700f37c94701L, 0xa6e86f7ba2779a5cL, 0x0a43a4f7036d1ec2L,
+ 0xd798bd6d52ad26daL, 0x218f6912af38b818L, 0xd48684f266f2e186L, 0x8f675048b7b012e5L,
+ 0xe5e469aac68eaf1dL, 0xe2740035697de79eL, 0xc22d6bd6d08baf1dL, 0x341774636bdc8f41L,
+ 0x7dfc6b73f7ba322bL, 0x7566343607bb525bL, 0xae94d116ccf1e74bL, 0x6ca1b59934cc2697L,
+ 0x4c2fb1c45b749cedL, 0x989999bbdd2ec893L, 0xcc4e27afa81bc8a8L, 0x6ddadf15ebf85830L,
+ 0x38fa9cb2ce72bc16L, 0xacdaffe39db4bbdaL, 0xbcc4682ebd095d93L, 0x483f539d354559adL,
+ 0x45de92e997e2915cL, 0x7ec5c881c5344a55L, 0x9d1844fffa091545L, 0xcd9b08d4dcda27baL,
+ 0x1f7495a5f36c34ceL, 0x4f0fc9647d99afd7L, 0x5ac375ec59321cf2L, 0x5c07ce6df7e1d9a2L,
+ 0x49f211880d688b4cL, 0xf85fdd8ccad0867aL, 0x7d510164d8f197a8L, 0xc64108c5732cfa0eL,
+ 0xb262d660d3a2c648L, 0xd5d5614571dd2efaL, 0x0ec1a6d0dd5d5391L, 0xbf07d939d2535f02L,
+ 0x035bce3021e51045L, 0x423ae115ec99d154L, 0x22ea1d3abd893838L, 0x517fc1107eaa6a83L,
+ 0xc5967cdf353aeac6L, 0x096ae2c3dff65ce6L, 0xab1b908b97dc911bL, 0xf3d84c286f22611cL,
+ 0x256823815030d8a2L, 0x3bd9b119887342e4L, 0x59926f3401f437d4L, 0x74edf41038d3986fL,
+ 0xe2b35bf615038253L, 0x4d09740a6b44db89L, 0xa37edaf089c0eeabL, 0x8263ba2c23e2d62dL,
+ 0x8784aff57d390c3cL, 0xfb49ab0635d66c3aL, 0xdeba73c2562bff1cL, 0xe2e6bf8cb6e29717L,
+ 0x0e70431c63d86e46L, 0x20d717e16aae6010L, 0x031af57cdcf2cd36L, 0xd55fbeef1c5357feL,
+ 0xd361d871f4e393feL, 0xb3416e718d32d214L, 0x7b351f93f909fc00L, 0x16916de7b96a26bdL,
+ 0x4fec1248b5dedb65L, 0xfae1aa9a62bfa096L, 0x92e7910a6b0084a9L, 0xd12bba8672e8aaa9L,
+ 0x316558d69efc8f6bL, 0xb0dde29eb96fee87L, 0x2125a2be5bf67eb3L, 0x5905903f46531fe4L,
+ 0x2a9927e8175ff60fL, 0x794376f2bb5d6d96L, 0xfa9f65d2b4848b12L, 0x2b92665a263a5091L,
+ 0xabcaccfab8464c65L, 0x05b2fb2a46d1a0bdL, 0xa879920d28c0d54cL, 0x50394088a8ea4953L,
+ 0x61b0c87f0084129dL, 0x29ebcd1078d6e2b0L, 0x2440c652f6bacf89L, 0xbd74d596cf4c8eb1L,
+ 0xe4b009e5c334766bL, 0x07db26843cf72cb8L, 0x4171d5edd5468876L, 0x608d5c2c348c143cL,
+ 0xa19e0a2b81da6eb5L, 0xb65a7be9354c1390L, 0xf4f4c437cb9bb324L, 0xfc24806650c823bdL,
+ 0x4c2331521e7f2966L, 0x54f66e42eb73bafeL, 0xf06c11f3d2fe29aeL, 0x8ba8d0f28cbb0fcbL,
+ 0xf3617850d1ae7976L, 0x96463b47cd9a7286L, 0x8edc2133b35c3779L, 0xae43f70f181d9371L,
+ 0xe7628d75c9a3c2e7L, 0x978499ba4193b333L, 0x99bb4bf79b0a46c1L, 0x4c52676d7e4d0a58L,
+ 0x2064ee3910693deeL, 0xfc43514d16633997L, 0x1bc1741ce05c4cceL, 0x6e9588d40f3396f6L,
+ 0x146fe816bb3a3708L, 0x2b3db8ee05eefa87L, 0x6ec21a91189ec0c0L, 0xa8a907b34108faf1L,
+ 0x708b80912235684fL, 0x2bc8ba70edfe680cL, 0x4d118826481266efL, 0x8f93a3a5de887175L,
+ 0x3308e9133a950fe3L, 0x939ed8b0d7e91f87L, 0x666beee64002b6b0L, 0xc8f129ec69ce7811L,
+ 0xd57593c68ce93ea0L, 0x02d6a3e66edcc862L, 0xbe1d00d16a2271a6L, 0x34fbeaf95e0c673fL,
+ 0x9845ab59483a0e86L, 0x257d47d5abf88962L, 0x28af39f39319545bL, 0xe3fce03abd8171eeL,
+ 0xa4c5f606dccc96f1L, 0x4d414846267c4962L, 0x6ccf77f81d9dbf70L, 0x947bf43c729a71ecL,
+ 0xfd656c39c4fa824cL, 0x8f652cf2d1e04fd6L, 0x8cb11929a65b6aeeL, 0x094948f16a8064daL,
+ 0x7434e703a4d03d5fL, 0x9361d3f63af4aa35L, 0xa998c1eeec3fb422L, 0x51eb94754b5992a2L,
+ 0x6e109c0347ef6979L, 0xe3c9738d67c582e2L, 0x9c735e3857ec57bfL, 0xbe6415659e12c64bL,
+ 0x73924584e31b9099L, 0x8f676821e60b0945L, 0x5614e3a695d5289dL, 0x7ecd448787517ebaL,
+ 0xc96db02038dbaf5bL, 0x069299ed774fa6c8L, 0x0b4ace5a8ea16ac8L, 0xbf2f4f23a6c92295L,
+ 0x90bdc4f1e931656cL, 0x7cd5b0b95ac34d3aL, 0x2032bc59d3dc1710L, 0x702c1a0cd5609379L,
+ 0x609d33abc01ff3feL, 0x8ae5d8f283b2748bL, 0x2cf3778fa7eaae1dL, 0xe8a0d7b1919df9e3L,
+ 0xe487894f6d602a0bL, 0x929858549609626aL, 0x46e540cd86bf46e7L, 0xd1daf4382128d9eaL,
+ 0xc47239c06b22ef75L, 0x8b7aad8ffea1b991L, 0xd6c1d2e315273fa0L, 0x2fda11cd74177e6bL,
+ 0x333cb0a145919fd7L, 0x5970b31a49f37b16L, 0x7890bc68793bb959L, 0x2a060f45a1719347L,
+ 0xeb298f0264bf379dL, 0xd7c4fd7921707400L, 0x374635e7713ed165L, 0xc60c008df0296d05L,
+ 0xbf13739a8d3c7dbbL, 0xbfb945ef1cf94d1dL, 0x75fe953c3a3a8315L, 0x09f83064f4150c02L,
+ 0x6784a3b452055343L, 0x73ed26d185738f51L, 0x6c59094e8c998390L, 0xeade93e19d60d4b5L,
+ 0x8cf7cc8e62bc869dL, 0x22f85626f7f69298L, 0x6679c449ac22edc0L, 0x7017d0003e897435L,
+ 0x308fc450a6c62bf8L, 0x2578b45bc6f34cabL, 0xcbb936c9d253db39L, 0xc4e70e5bbc5e002cL,
+ 0x29db6985be6c9459L, 0x96afe876f5f6250cL, 0x829f766f138f95e6L, 0x4369632017c8fa0dL,
+ 0x0da90c817ca890a2L, 0x38d160dd675e2376L, 0x20df15ad986408eaL, 0xd192623c3d9b3f41L,
+ 0xd846f79123baf4aaL, 0x6cb058a0edfbf056L, 0x1b192f0be8dc77a7L, 0x3a11b3dfcc81a441L,
+ 0xe914410093ad7767L, 0x3126257e578bdf60L, 0xd5d5e470410cb6eaL, 0x4e1bf5d4209248aeL,
+ 0xe1e4c2924f35192eL, 0xac9944825cb7ef5eL, 0x8d2cbe6996eb3475L, 0x1bc05d2a079592d7L,
+ 0x564a9f06755e71f3L, 0x9bb767d68e9f2537L, 0xe4b045acf13978a2L, 0x4b7519cb9028ac83L,
+ 0x9df655284198b85cL, 0xdc32ab4d421a2b61L, 0x4c5d7f5323c1960cL, 0xe4273ff318f5c7b3L,
+ 0xd73ef5ea88a3e99eL, 0xda2ffb6a863c850bL, 0x9555a4144e05ad82L, 0x950104dc15092ebfL,
+ 0x39d121a61f19dbfeL, 0xc6804e29d60d7814L, 0x7e98bec5ba17d58bL, 0x8b2c6b0e6c3b749aL,
+ 0x0301a07c84aaccdbL, 0x93dee719932225a3L, 0x381611a50bac0ae1L, 0x572a8816f6e407b4L,
+ 0x0420efe85aa75232L, 0xc1f53f78b9ffcf4dL, 0xbeda53bc95b96ec3L, 0x9f357114059c8eabL,
+ 0xe38239260b584150L, 0xccbca17f4eed2ad0L, 0x1528080b61f54198L, 0x5b8cdc4c40d49f30L,
+ 0x1617db48eb6640d0L, 0x6fed27f88a516c99L, 0x37056e05b4724179L, 0xec7bc122da9538d8L,
+ 0x9fbfe01ca2c0fd57L, 0x2fc96b31dccafd9fL, 0xe26a72009daa1249L, 0xe9fb2e3998d16a25L,
+ 0x4a87dc39d24133aeL, 0xd5340e98fde806deL, 0x272b62b5dd0d7fe3L, 0xca4625581bf9dbe1L,
+ 0x8677af77de374a90L, 0x27dbec9e28f857edL, 0xb4aefc44d036612aL, 0xcf2e8ebdb0f6bb11L,
+ 0x76023506c94e0532L, 0x864e72d4488c7a7aL, 0x0b81058fdac18fd3L, 0xdf93ee5b6674a0f4L,
+ 0xdb30565511789d77L, 0xcf5fe22dc0375f30L, 0xa6e62e6e4edb4043L, 0xbce383957a728669L,
+ 0xfe4dd4e9633db2c6L, 0x24e68818b2a6d6cdL, 0x048a89c5424b4cdbL, 0x7fc7bc75bbbe5768L,
+ 0x79596343191e0ff2L, 0x5510b9cd8306839fL, 0xff2668b4eae7bb53L, 0xb4c03e6363c9e244L,
+ 0xc9e3c0c1c015eb6fL, 0x52531f5f898a744fL, 0x0484005b2a805083L, 0x31673b70c6f23c53L,
+ 0x5bffe158f323a7c2L, 0xc742bc0d0c55f125L, 0xd95c32fe7e18379dL, 0xc1f2f613ee3c2e21L,
+ 0x3217a43ff0daaa0eL, 0x3a9fa27258257e53L, 0x80b42af5a393bcf2L, 0xb6967fd6a302f65eL,
+ 0xfdc07bc592dbb125L, 0xcb83b8b9f64c3c3bL, 0x9cb572b041015355L, 0xc12dc512aedc530cL,
+ 0xc8db824276c083ceL, 0x86923b0e2903627fL, 0x1385cf2be22827cdL, 0x21b7616ced869ef1L,
+ 0xc74d497d079901e6L, 0x9e03c843bb13f658L, 0x915b89077a81ec7fL, 0x288a10b00768d244L,
+ 0xd88eb6745a557569L, 0xb3c98071a3d13b20L, 0x8f23aff44d352f03L, 0x2bf39ca10e45bdbbL,
+ 0x0f1bea47e2c68a4cL, 0xf8d5ab01c1ad6b55L, 0x679e0601953d1e31L, 0xd793f3aacb3c520fL,
+ 0x96fc350ccdb76eabL, 0x9fa0178362df447bL, 0xc11c63febf83598aL, 0x3aa88df3a1a71323L,
+ 0xab2f8338a09ca82aL, 0x32a2133050a71357L, 0xffecf97ca3ff65e1L, 0xfb6fd13318f5cb79L,
+ 0x3acf76875acad366L, 0xc577ffff529f74cfL, 0x368a90182031dd12L, 0xafbf2311ad656d52L,
+ 0x80cd4f9f23fcafddL, 0x451717a061972d1fL, 0x0bbcbdae779cfbf3L, 0x133ca541293fd40dL,
+ 0x6f241a21fc40b108L, 0x9adecbcf0c28110bL, 0xfab528d93bac6d3aL, 0xf4ea3d459b0654aaL,
+ 0x7e2e9ef35a5aafbaL, 0x28730469eded0fc7L, 0x3cbae97a12632fbeL, 0xded6960c0be007a8L,
+ 0x2a11758a7c52c43eL, 0x289de4875bda262dL, 0x6e13eea58caf3fa7L, 0x020c8ed0d5d673c1L,
+ 0xdb4b3e7719d523b6L, 0x49143c819d111fc3L, 0xe07479f9ddf45d8eL, 0x68f4654bcc07435bL,
+ 0x513bd537af510064L, 0xcf956c3a3933ba38L, 0x97e1eaa33f88eeccL, 0x18be860a2504a1c5L,
+ 0x84408412fc0bf397L, 0x0b6bdba7e154bdf7L, 0x1d8f8b446b544be6L, 0x6f06b3dcdef17a03L,
+ 0x30c6e14df59f8cefL, 0x01c97ba9910219cfL, 0x33ddcc087d1aeb5cL, 0xe31b94300cfbcbcfL,
+ 0x0adeb8a98786bb28L, 0x3f69d5b0e3ec8f17L, 0x99f5a15f635296a6L, 0xce9fac7526862e86L,
+ 0x3a88964201bd7524L, 0xec94d643ea71be51L, 0xc4257084d97ab1c5L, 0xf369b10a73b4d382L,
+ 0xac02bb473dbc5fd1L, 0x4fe73a86d95d7222L, 0x858806616fe3d553L, 0x10680debcb0693e4L,
+ 0xcaa9aac77c954093L, 0xf29c7530415d71e5L, 0xc32b319e09de9e48L, 0x1c67107ed497ebc4L,
+ 0x731da71593324021L, 0x49774770588c055aL, 0xf978dfdc28084220L, 0x058b3f2780b5a7ecL,
+ 0xe4ebf2ca21410715L, 0xd3841ed97708421fL, 0x0dbc9401dc51eb4eL, 0xf47a96de499aa2e1L,
+ 0x224da94d8542ba0cL, 0xa3426a80b4dd0a4aL, 0x857caef48ef7e5b6L, 0x11356ad6ede44bf5L,
+ 0x1a32471bd26acd7aL, 0x199396e31de7b358L, 0xb7ca7950dbbb4a92L, 0x6ab23720409790a7L,
+ 0x2abfdb93a3159d10L, 0x23913b403946c4a7L, 0xac7c9f339a822344L, 0x12cffe9625cbe744L,
+ 0x89558b98548b1946L, 0x77be65945c191139L, 0x3ba8d1fc701f4347L, 0xb143664560327f20L,
+ 0x48baccc3ef2081ffL, 0x450c379d24beb8e9L, 0x1990b609485db827L, 0x6c6a565d7129ccb4L,
+ 0xf9724a82872bd619L, 0xcfe629aa56717e20L, 0xfde48d87e844ec93L, 0xb32f79e5dc9ce4c1L,
+ 0x7c9d88364238519fL, 0xe943aceba65150f9L, 0x5301e8550cbdd076L, 0xabb8392364453b3cL,
+ 0xdfb4b4a3cf84aa2dL, 0x269e45f7a6b48a42L, 0xd6783043ab383fcfL, 0xe4ec475d296a69e5L,
+ 0xe2e273ef65555361L, 0x6bd3084210a75af7L, 0xf2ebc493b909d8c7L, 0x4d20f3d435e9bc94L,
+ 0xa465e41c3c36d433L, 0xc1b259456f4341c0L, 0x260093703d6cf2ebL, 0xda68d9dea0aa9bdaL,
+ 0x5662a12a210b2a47L, 0x54675bd1a1b4b467L, 0x9dbd416302ec2468L, 0x3c7130a5032d823aL,
+ 0xabfdef2d9a4fd92fL, 0xd4034e276021451fL, 0x13834d3d0e43ab73L, 0xdc181442b438b2d6L,
+ 0x1736ffb392c25e23L, 0x289b94003a946252L, 0x99705629b221ca37L, 0xa7b22a5bb26775d6L,
+ 0x2dc12f9f04435661L, 0xaadd48b556bc9e7cL, 0xf6992e8e94b68a49L, 0xd50420466c9456e3L,
+ 0x0ea8305ecdfb1266L, 0xfe0b1d7e4f0ef297L, 0x563de834c4e56a46L, 0xc62b8099b5b264c6L,
+ 0xf6e76aeaf533c784L, 0x0d4680470b790968L, 0x288a50754707431eL, 0x8ad167ed38df547eL,
+ 0x9052fed81a8ca4faL, 0x5975ac56f0548ef1L, 0x588bf7d0130111aeL, 0x9ec02036a6688a24L,
+ 0x8c9a454af9e09984L, 0x333ee6727bd12dcbL, 0x9847468f925dc38cL, 0x446ed5203696abacL,
+ 0x71fddf9ef5b5def6L, 0xd4d61614cc333541L, 0xd08a0694cd7f72a7L, 0x686cfe3ea1889281L,
+ 0xf039404e0dd3333fL, 0x052c620eb18b4246L, 0x4e4de47f86d84713L, 0xfe0450396b209851L,
+ 0x99d6e893b01ed92bL, 0xd94cf8705f8eba86L, 0x763451110c00291bL, 0xdf4f60b9aa45d064L,
+ 0xf473d4bfd86ad526L, 0x41b9e3fa1a6dba94L, 0xbaa7cdeb00796a4aL, 0xf668194c40626450L,
+ 0xb894e0ae40a9c87fL, 0x5bc1eea8587d3ddbL, 0xc4c0ecb91bb50d75L, 0x819fdfd17ff2917bL,
+ 0x681484e54b6b12f7L, 0x2f510aa2f8977995L, 0x7d1582a293b8fa3dL, 0x3dad5a0f0da45470L,
+ 0x33c113aefb480520L, 0xbd524b2da7ce6c1fL, 0xe4cc051d00d8ddc0L, 0x2995950e206efa90L,
+ 0x8b0e5dca588e3f50L, 0xaabb3583f7f87082L, 0x75dbbecfa34cb4d6L, 0xf195977068849ae8L,
+ 0x9223ca6fbb72767cL, 0xda7211029d59f04eL, 0x18d9987c6566405cL, 0x57833aa39ef75a04L,
+ 0xd1750e36481f654bL, 0x0ce2b66bc8796acbL, 0xc7e79aa76c96b057L, 0x68f95b6b3c5cdc1dL,
+ 0x2f5725cf5fc583aeL, 0x6b973013fd4484a6L, 0xaaeb2687f2d8bb96L, 0xad29cce061ba3934L,
+ 0xcb60dd1c437eb1d9L, 0x5cd6f46b78181bb4L, 0x1561cdc95ace24d9L, 0xbb774e6705806245L,
+ 0xdc29c8df29b2e975L, 0x6ee5ba502839dccdL, 0x670869bb64c60f69L, 0x008ca2931e927ae7L,
+ 0x35cf6c0a27d8de77L, 0x94a3d86209af3920L, 0x4095a276475df5b7L, 0x1119e4c257ccf7fbL,
+ 0x33376166d9064fe8L, 0xd68c2399f968b905L, 0xb7bf2902f40fc101L, 0x4ec18604cfd551e0L,
+ 0xeb8e7fe1b6678e99L, 0xdcfe68fc0e042fa6L, 0xd2e58dfb1a8e3866L, 0xf4322bc57fb9a35aL,
+ 0xe0c665c8cf1fb49bL, 0x60de1f1050684297L, 0xf400c04cb00784cdL, 0xfc2a216f12016984L,
+ 0xa808b477fd65fb4aL, 0xd9b614adfcb5d0f1L, 0x50afdbc66e3efad2L, 0x82337b3f1764851cL,
+ 0xdc98850eb93ef45eL, 0xe1c314bbc2c6af27L, 0xd35614ba27e74a71L, 0xa5d592e04a31bb6fL,
+ 0x3f143cd0bc243fbeL, 0x081641ac25408b21L, 0xd4166b32a26fc1c6L, 0xccd088ee4d4a1f67L,
+ 0x698c913d46c1ec99L, 0x0f6b9086a5b986abL, 0x4a73c05ef72e3595L, 0x0307aeeb350ab081L,
+ 0x43e20045bcb06b0eL, 0x3f58d1d6cd3aa0dcL, 0xd71cd7c996faba80L, 0x4431d8268eebfb71L,
+ 0x254246df109e3dd5L, 0xa7ca1449a238b06aL, 0x49b40e7b082493e7L, 0x45d80e6bd330d613L,
+ 0xaf3d8a578b6d6232L, 0xa4b98341785262d1L, 0xf4f1f424af963102L, 0xa84a986395146774L,
+ 0x90da037fb61d5c88L, 0xb645534b2cf5b89fL, 0x3fdb3073310934b4L, 0x1a0307d01f57f514L,
+ 0x509c9b87a4a1e66cL, 0xbf320cf0888d8aa8L, 0x45a51f76c5f76892L, 0x23eb7a2b99a64402L,
+ 0x4c600e5675dd7757L, 0x4896757aa01a5c34L, 0xb808dbbda7a8a1daL, 0x762c21058ba50349L,
+ 0x99b0a9d5deeebb37L, 0xd6d98ef70a1e465dL, 0xb052f2c1163894f6L, 0xc55e73526f8bc8faL,
+ 0xb31a0537f5b3b269L, 0xf09c1819c0c7f78aL, 0xc36d4e2187e430f8L, 0xf141831a47299c7bL,
+ 0x62f938047903ef34L, 0xf2a0dd678f92e0a5L, 0x0c7fe6a53efaaa65L, 0xcc539fcdcc466310L,
+ 0x55199357cdc55491L, 0x6917fb45babb399eL, 0xb098da3c7b012b1aL, 0x054916438f426c41L,
+ 0x1a5ff3356d77d43bL, 0x74e71995e0aacf1aL, 0x6562a8da6b5e69eeL, 0xacbc2b8d1fb16ea8L,
+ 0x400ea8e1f3f5535eL, 0x2ea792dad3a4538fL, 0xf580fe481db60b5cL, 0xcb101198dd0aba9fL,
+ 0x259acbe0461cb837L, 0x30033c3964b56a40L, 0x6c15d4283eeb6fa6L, 0xdea7b626998ea3eeL,
+ 0xdbb2e1b8c0c2abdbL, 0x3a856a6742b6edc2L, 0x0777ed6b1683f48bL, 0xde72fd7d6db3bb63L,
+ 0xc8766969b599dc68L, 0xb39a5b76dce26160L, 0x97464948ce81d8a2L, 0xae20fda5af404ae6L,
+ 0xde1100c4f1ae3265L, 0x05a94d43bf60f574L, 0xc087a2116f52d0fcL, 0xfacb3be87e615d89L,
+ 0x0e184cb9fba7b0feL, 0x824779bede6d84ffL, 0xa0852e96875da152L, 0x620046e8ba89baefL,
+ 0x247c32c5f34b08ddL, 0x49294468356e7298L, 0xaf6d6e0f8b5009ebL, 0x8c25bfcdb8abd77fL,
+ 0x4f5464a1bc417e38L, 0x2df8fbe8993f8c9fL, 0x6540566281dd6d91L, 0x0b90690dcfb03a83L,
+ 0xe270b7c7f8fab463L, 0x898ead41792a7f87L, 0xa1b1248822b7c292L, 0xfa2c0d61dd383eabL,
+ 0x5574c091830bd677L, 0x43640e20702986e5L, 0x622d0a1c860d0302L, 0x9528ea0051990eb9L,
+ 0x28f057ef30af388fL, 0x88320e974a2721a0L, 0x8a12cb33cdd88b60L, 0xd91a9763f991780dL,
+ 0xdf22e332867c0e97L, 0xad95801b6c801f10L, 0xb34e21d4afe2c4a0L, 0xd5465bf172494dd3L,
+ 0x16594af34f1b5767L, 0xa675dceaee1591e6L, 0x53db891db5e1d768L, 0x39a80f5d365c71afL,
+ 0xdce01c73eac54372L, 0x1087fb03e5ce69e9L, 0x067cac3905594378L, 0x275d24c9aa1607f0L,
+ 0x9163a77a53e361b8L, 0x17d10f8254fa7f0bL, 0x49efeab6642e9e45L, 0x376e24839b1df1beL,
+ 0x0c46221cc408546fL, 0x98eb5bb7001ebf5cL, 0xc6c4d56e3c9a78efL, 0x023c0723e123a899L,
+ 0x145912ec44b57548L, 0x488a34fe824ff4c3L, 0xac3bc6de9929c707L, 0x1dbac6e98813a70fL,
+ 0xf566054941858266L, 0x18e0a3a2a8b8f2f1L, 0xcc6245a26564a399L, 0x14416ca0e1a84a9aL,
+ 0x4eaf095631a6e7bfL, 0xf2f89f104c9d0b8dL, 0x8fb278a5953e52d8L, 0x8fcee83a30a8be30L,
+ 0xb66850da1a0ceb33L, 0x5f37d31bad76f4dcL, 0xff4d956ffea8dea4L, 0x078c583b396635b3L,
+ 0xad268fb5b1105028L, 0xa480149a0dcbc5f4L, 0xb0e8d69c8b15c864L, 0x6ed49c46f19bb8eaL,
+ 0x7f1871fdf321818dL, 0x1ec5816f5a9843eaL, 0x77c8da91b5313675L, 0x4cdb66ad515e0717L,
+ 0x2ec4712b0bfdfcd6L, 0x6c6f5767fff27330L, 0x071083b972d80c0cL, 0x8d8325e82c4fdcdcL,
+ 0xb47a658dad8e13a4L, 0x88710bf005fda027L, 0x69bd3edaf7111200L, 0x0dccdd0c65c810ffL,
};
RandomAssert.assertEquals(expectedSequence, rng);
diff --git a/commons-rng-core/src/test/java/org/apache/commons/rng/core/source64/TwoCmresTest.java b/commons-rng-core/src/test/java/org/apache/commons/rng/core/source64/TwoCmresTest.java
index 4c8e6d6..a1d8202 100644
--- a/commons-rng-core/src/test/java/org/apache/commons/rng/core/source64/TwoCmresTest.java
+++ b/commons-rng-core/src/test/java/org/apache/commons/rng/core/source64/TwoCmresTest.java
@@ -69,7 +69,7 @@ public class TwoCmresTest {
}
}
- for (int wrongIndex : new int[] { -1, max }) {
+ for (int wrongIndex : new int[] {-1, max}) {
try {
new TwoCmres(seed, wrongIndex, 1);
Assert.fail("Exception expected for index=" + wrongIndex);
@@ -86,7 +86,7 @@ public class TwoCmresTest {
}
}
- @Test(expected=IllegalStateException.class)
+ @Test(expected = IllegalStateException.class)
public void testCmresFactoryThrowsWithDuplicateMultiplier() {
ArrayList<Cmres> list = new ArrayList<Cmres>();
final long multiply = 0;
diff --git a/commons-rng-core/src/test/java/org/apache/commons/rng/core/util/NumberFactoryTest.java b/commons-rng-core/src/test/java/org/apache/commons/rng/core/util/NumberFactoryTest.java
index a3bbc01..9236f4d 100644
--- a/commons-rng-core/src/test/java/org/apache/commons/rng/core/util/NumberFactoryTest.java
+++ b/commons-rng-core/src/test/java/org/apache/commons/rng/core/util/NumberFactoryTest.java
@@ -30,12 +30,12 @@ public class NumberFactoryTest {
private static final int LONG_SIZE = 8;
/** Test values. */
- private static final long[] LONG_TEST_VALUES = new long[] { 0L, 1L, -1L, 19337L, 1234567891011213L,
- -11109876543211L, Long.valueOf(Integer.MAX_VALUE), Long.valueOf(Integer.MIN_VALUE), Long.MAX_VALUE,
- Long.MIN_VALUE, 0x9e3779b97f4a7c13L };
+ private static final long[] LONG_TEST_VALUES = new long[] {0L, 1L, -1L, 19337L, 1234567891011213L,
+ -11109876543211L, Long.valueOf(Integer.MAX_VALUE), Long.valueOf(Integer.MIN_VALUE), Long.MAX_VALUE,
+ Long.MIN_VALUE, 0x9e3779b97f4a7c13L};
/** Test values. */
- private static final int[] INT_TEST_VALUES = new int[] { 0, 1, -1, 19337, 1234567891, -1110987656,
- Integer.MAX_VALUE, Integer.MIN_VALUE, 0x9e3779b9 };
+ private static final int[] INT_TEST_VALUES = new int[] {0, 1, -1, 19337, 1234567891, -1110987656,
+ Integer.MAX_VALUE, Integer.MIN_VALUE, 0x9e3779b9};
@Test
public void testMakeBooleanFromInt() {
@@ -121,7 +121,7 @@ public class NumberFactoryTest {
// Test individually the bytes are the same as the array conversion
for (int i = 0; i < LONG_TEST_VALUES.length; i++) {
final byte[] b1 = NumberFactory.makeByteArray(LONG_TEST_VALUES[i]);
- final byte[] b2 = NumberFactory.makeByteArray(new long[] { LONG_TEST_VALUES[i] });
+ final byte[] b2 = NumberFactory.makeByteArray(new long[] {LONG_TEST_VALUES[i]});
Assert.assertArrayEquals(b1, b2);
}
}
@@ -160,7 +160,7 @@ public class NumberFactoryTest {
// Test individually the bytes are the same as the array conversion
for (int i = 0; i < INT_TEST_VALUES.length; i++) {
final byte[] b1 = NumberFactory.makeByteArray(INT_TEST_VALUES[i]);
- final byte[] b2 = NumberFactory.makeByteArray(new int[] { INT_TEST_VALUES[i] });
+ final byte[] b2 = NumberFactory.makeByteArray(new int[] {INT_TEST_VALUES[i]});
Assert.assertArrayEquals(b1, b2);
}
}
diff --git a/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/CollectionSamplerTest.java b/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/CollectionSamplerTest.java
index 31ed081..3ea70c1 100644
--- a/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/CollectionSamplerTest.java
+++ b/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/CollectionSamplerTest.java
@@ -47,7 +47,7 @@ public class CollectionSamplerTest {
Assert.fail(word + " not in list");
}
- @Test(expected=IllegalArgumentException.class)
+ @Test(expected = IllegalArgumentException.class)
public void testSamplePrecondition() {
// Must fail for empty collection.
new CollectionSampler<String>(RandomSource.create(RandomSource.MT),
diff --git a/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/CombinationSamplerTest.java b/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/CombinationSamplerTest.java
index 7b80d36..3472a89 100644
--- a/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/CombinationSamplerTest.java
+++ b/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/CombinationSamplerTest.java
@@ -11,7 +11,7 @@
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing sampleissions and
+ * See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.commons.rng.sampling;
@@ -121,7 +121,7 @@ public class CombinationSamplerTest {
* @param n the n
* @param value the sample value
*/
- private static final void assertIsInDomain(int n, int value) {
+ private static void assertIsInDomain(int n, int value) {
if (value < 0 || value >= n) {
Assert.fail("sample " + value + " not in the domain " + n);
}
@@ -172,7 +172,7 @@ public class CombinationSamplerTest {
for (int s : sample) {
// This shift will be from 0 to n-1 since it is from the
// domain of size n.
- bits |= (1 << s);
+ bits |= 1 << s;
}
if (bits >= codeLookup.length) {
Assert.fail("Bad bit combination: " + Arrays.toString(sample));
diff --git a/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/DiscreteProbabilityCollectionSamplerTest.java b/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/DiscreteProbabilityCollectionSamplerTest.java
index b02bde5..cae03cf 100644
--- a/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/DiscreteProbabilityCollectionSamplerTest.java
+++ b/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/DiscreteProbabilityCollectionSamplerTest.java
@@ -24,7 +24,6 @@ import java.util.List;
import org.junit.Assert;
import org.junit.Test;
import org.apache.commons.rng.UniformRandomProvider;
-import org.apache.commons.rng.core.source64.SplitMix64;
import org.apache.commons.rng.simple.RandomSource;
/**
@@ -32,48 +31,48 @@ import org.apache.commons.rng.simple.RandomSource;
*/
public class DiscreteProbabilityCollectionSamplerTest {
/** RNG. */
- private static final UniformRandomProvider rng = RandomSource.create(RandomSource.WELL_1024_A);
+ private final UniformRandomProvider rng = RandomSource.create(RandomSource.WELL_1024_A);
- @Test(expected=IllegalArgumentException.class)
+ @Test(expected = IllegalArgumentException.class)
public void testPrecondition1() {
// Size mismatch
new DiscreteProbabilityCollectionSampler<Double>(rng,
Arrays.asList(new Double[] {1d, 2d}),
new double[] {0d});
}
- @Test(expected=IllegalArgumentException.class)
+ @Test(expected = IllegalArgumentException.class)
public void testPrecondition2() {
// Negative probability
new DiscreteProbabilityCollectionSampler<Double>(rng,
Arrays.asList(new Double[] {1d, 2d}),
new double[] {0d, -1d});
}
- @Test(expected=IllegalArgumentException.class)
+ @Test(expected = IllegalArgumentException.class)
public void testPrecondition3() {
// Probabilities do not sum above 0
new DiscreteProbabilityCollectionSampler<Double>(rng,
Arrays.asList(new Double[] {1d, 2d}),
new double[] {0d, 0d});
}
- @Test(expected=IllegalArgumentException.class)
+ @Test(expected = IllegalArgumentException.class)
public void testPrecondition4() {
// NaN probability
new DiscreteProbabilityCollectionSampler<Double>(rng,
Arrays.asList(new Double[] {1d, 2d}),
new double[] {0d, Double.NaN});
}
- @Test(expected=IllegalArgumentException.class)
+ @Test(expected = IllegalArgumentException.class)
public void testPrecondition5() {
// Infinite probability
new DiscreteProbabilityCollectionSampler<Double>(rng,
Arrays.asList(new Double[] {1d, 2d}),
new double[] {0d, Double.POSITIVE_INFINITY});
}
- @Test(expected=IllegalArgumentException.class)
+ @Test(expected = IllegalArgumentException.class)
public void testPrecondition6() {
// Empty Map<T, Double> not allowed
new DiscreteProbabilityCollectionSampler<Double>(rng,
- new HashMap<Double,Double>());
+ new HashMap<Double, Double>());
}
@Test
@@ -125,7 +124,8 @@ public class DiscreteProbabilityCollectionSamplerTest {
// a probability (for the second item) that hits an edge case.
final double probability = pastLast ? 1.1 : 1;
final UniformRandomProvider dummyRng = new UniformRandomProvider() {
- int count;
+ private int count;
+ // CHECKSTYLE: stop all
public long nextLong(long n) { return 0; }
public long nextLong() { return 0; }
public int nextInt(int n) { return 0; }
@@ -136,6 +136,7 @@ public class DiscreteProbabilityCollectionSamplerTest {
public void nextBytes(byte[] bytes, int start, int len) {}
public void nextBytes(byte[] bytes) {}
public boolean nextBoolean() { return false; }
+ // CHECKSTYLE: resume all
};
final List<Double> items = Arrays.asList(new Double[] {1d, 2d});
diff --git a/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/ListSamplerTest.java b/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/ListSamplerTest.java
index daa69ca..3f1c91c 100644
--- a/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/ListSamplerTest.java
+++ b/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/ListSamplerTest.java
@@ -39,12 +39,12 @@ public class ListSamplerTest {
@Test
public void testSample() {
- final String[][] c = { { "0", "1" }, { "0", "2" }, { "0", "3" }, { "0", "4" },
- { "1", "2" }, { "1", "3" }, { "1", "4" },
- { "2", "3" }, { "2", "4" },
- { "3", "4" } };
- final long[] observed = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
- final double[] expected = { 100, 100, 100, 100, 100, 100, 100, 100, 100, 100 };
+ final String[][] c = {{"0", "1"}, {"0", "2"}, {"0", "3"}, {"0", "4"},
+ {"1", "2"}, {"1", "3"}, {"1", "4"},
+ {"2", "3"}, {"2", "4"},
+ {"3", "4"}};
+ final long[] observed = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
+ final double[] expected = {100, 100, 100, 100, 100, 100, 100, 100, 100, 100};
final HashSet<String> cPop = new HashSet<String>(); // {0, 1, 2, 3, 4}.
for (int i = 0; i < 5; i++) {
@@ -78,7 +78,7 @@ public class ListSamplerTest {
Assert.assertTrue(one.contains("one"));
}
- @Test(expected=IllegalArgumentException.class)
+ @Test(expected = IllegalArgumentException.class)
public void testSamplePrecondition1() {
// Must fail for sample size > collection size.
final List<String> list = new ArrayList<String>();
@@ -86,7 +86,7 @@ public class ListSamplerTest {
ListSampler.sample(rng, list, 2);
}
- @Test(expected=IllegalArgumentException.class)
+ @Test(expected = IllegalArgumentException.class)
public void testSamplePrecondition2() {
// Must fail for empty collection.
final List<String> list = new ArrayList<String>();
diff --git a/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/PermutationSamplerTest.java b/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/PermutationSamplerTest.java
index b82022f..21c9c42 100644
--- a/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/PermutationSamplerTest.java
+++ b/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/PermutationSamplerTest.java
@@ -54,9 +54,9 @@ public class PermutationSamplerTest {
public void testSampleChiSquareTest() {
final int n = 3;
final int k = 3;
- final int[][] p = { { 0, 1, 2 }, { 0, 2, 1 },
- { 1, 0, 2 }, { 1, 2, 0 },
- { 2, 0, 1 }, { 2, 1, 0 } };
+ final int[][] p = {{0, 1, 2}, {0, 2, 1},
+ {1, 0, 2}, {1, 2, 0},
+ {2, 0, 1}, {2, 1, 0}};
runSampleChiSquareTest(n, k, p);
}
@@ -64,12 +64,12 @@ public class PermutationSamplerTest {
public void testSubSampleChiSquareTest() {
final int n = 4;
final int k = 2;
- final int[][] p = { { 0, 1 }, { 1, 0 },
- { 0, 2 }, { 2, 0 },
- { 0, 3 }, { 3, 0 },
- { 1, 2 }, { 2, 1 },
- { 1, 3 }, { 3, 1 },
- { 2, 3 }, { 3, 2 } };
+ final int[][] p = {{0, 1}, {1, 0},
+ {0, 2}, {2, 0},
+ {0, 3}, {3, 0},
+ {1, 2}, {2, 1},
+ {1, 3}, {3, 1},
+ {2, 3}, {3, 2}};
runSampleChiSquareTest(n, k, p);
}
@@ -82,25 +82,25 @@ public class PermutationSamplerTest {
Assert.assertEquals(0, perm[0]);
}
- @Test(expected=IllegalArgumentException.class)
+ @Test(expected = IllegalArgumentException.class)
public void testSamplePrecondition1() {
// Must fail for k > n.
new PermutationSampler(rng, 2, 3);
}
- @Test(expected=IllegalArgumentException.class)
+ @Test(expected = IllegalArgumentException.class)
public void testSamplePrecondition2() {
// Must fail for n = 0.
new PermutationSampler(rng, 0, 0);
}
- @Test(expected=IllegalArgumentException.class)
+ @Test(expected = IllegalArgumentException.class)
public void testSamplePrecondition3() {
// Must fail for k < n < 0.
new PermutationSampler(rng, -1, 0);
}
- @Test(expected=IllegalArgumentException.class)
+ @Test(expected = IllegalArgumentException.class)
public void testSamplePrecondition4() {
// Must fail for k < n < 0.
new PermutationSampler(rng, 1, -1);
@@ -142,7 +142,7 @@ public class PermutationSamplerTest {
@Test
public void testShuffleTail() {
- final int[] orig = new int[] { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 };
+ final int[] orig = new int[] {0, 1, 2, 3, 4, 5, 6, 7, 8, 9};
final int[] list = orig.clone();
final int start = 4;
PermutationSampler.shuffle(rng, list, start, false);
@@ -165,7 +165,7 @@ public class PermutationSamplerTest {
@Test
public void testShuffleHead() {
- final int[] orig = new int[] { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 };
+ final int[] orig = new int[] {0, 1, 2, 3, 4, 5, 6, 7, 8, 9};
final int[] list = orig.clone();
final int start = 4;
PermutationSampler.shuffle(rng, list, start, true);
diff --git a/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/UnitSphereSamplerTest.java b/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/UnitSphereSamplerTest.java
index 0d64d26..311f87e 100644
--- a/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/UnitSphereSamplerTest.java
+++ b/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/UnitSphereSamplerTest.java
@@ -66,6 +66,7 @@ public class UnitSphereSamplerTest {
@Test(expected = StackOverflowError.class)
public void testBadProvider1() {
final UniformRandomProvider bad = new UniformRandomProvider() {
+ // CHECKSTYLE: stop all
public long nextLong(long n) { return 0; }
public long nextLong() { return 0; }
public int nextInt(int n) { return 0; }
@@ -75,6 +76,7 @@ public class UnitSphereSamplerTest {
public void nextBytes(byte[] bytes, int start, int len) {}
public void nextBytes(byte[] bytes) {}
public boolean nextBoolean() { return false; }
+ // CHECKSTYLE: resume all
};
new UnitSphereSampler(1, bad).nextVector();
@@ -86,9 +88,11 @@ public class UnitSphereSamplerTest {
// Create a provider that will create a bad first sample but then recover.
// This checks recursion will return a good value.
final UniformRandomProvider bad = new SplitMix64(0L) {
- int count;
+ private int count;
+ // CHECKSTYLE: stop all
public long nextLong() { return (count++ == 0) ? 0 : super.nextLong(); }
public double nextDouble() { return (count++ == 0) ? 0 : super.nextDouble(); }
+ // CHECKSTYLE: resume all
};
final double[] vector = new UnitSphereSampler(1, bad).nextVector();
diff --git a/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/AhrensDieterExponentialSamplerTest.java b/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/AhrensDieterExponentialSamplerTest.java
index 54f1978..1dceaeb 100644
--- a/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/AhrensDieterExponentialSamplerTest.java
+++ b/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/AhrensDieterExponentialSamplerTest.java
@@ -27,7 +27,7 @@ public class AhrensDieterExponentialSamplerTest {
/**
* Test the constructor with a bad mean.
*/
- @Test(expected=IllegalArgumentException.class)
+ @Test(expected = IllegalArgumentException.class)
public void testConstructorThrowsWithZeroMean() {
final RestorableUniformRandomProvider rng =
RandomSource.create(RandomSource.SPLIT_MIX_64);
diff --git a/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/AhrensDieterMarsagliaTsangGammaSamplerTest.java b/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/AhrensDieterMarsagliaTsangGammaSamplerTest.java
index c93a63d..eee689b 100644
--- a/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/AhrensDieterMarsagliaTsangGammaSamplerTest.java
+++ b/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/AhrensDieterMarsagliaTsangGammaSamplerTest.java
@@ -27,7 +27,7 @@ public class AhrensDieterMarsagliaTsangGammaSamplerTest {
/**
* Test the constructor with a bad alpha.
*/
- @Test(expected=IllegalArgumentException.class)
+ @Test(expected = IllegalArgumentException.class)
public void testConstructorThrowsWithZeroAlpha() {
final RestorableUniformRandomProvider rng =
RandomSource.create(RandomSource.SPLIT_MIX_64);
@@ -41,7 +41,7 @@ public class AhrensDieterMarsagliaTsangGammaSamplerTest {
/**
* Test the constructor with a bad theta.
*/
- @Test(expected=IllegalArgumentException.class)
+ @Test(expected = IllegalArgumentException.class)
public void testConstructorThrowsWithZeroTheta() {
final RestorableUniformRandomProvider rng =
RandomSource.create(RandomSource.SPLIT_MIX_64);
diff --git a/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/BoxMullerGaussianSamplerTest.java b/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/BoxMullerGaussianSamplerTest.java
index a53a2ce..ae574d1 100644
--- a/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/BoxMullerGaussianSamplerTest.java
+++ b/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/BoxMullerGaussianSamplerTest.java
@@ -27,7 +27,7 @@ public class BoxMullerGaussianSamplerTest {
/**
* Test the constructor with a bad standard deviation.
*/
- @Test(expected=IllegalArgumentException.class)
+ @Test(expected = IllegalArgumentException.class)
public void testConstructorThrowsWithZeroStandardDeviation() {
final RestorableUniformRandomProvider rng =
RandomSource.create(RandomSource.SPLIT_MIX_64);
diff --git a/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/BoxMullerLogNormalSamplerTest.java b/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/BoxMullerLogNormalSamplerTest.java
index bacadc0..d801dd6 100644
--- a/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/BoxMullerLogNormalSamplerTest.java
+++ b/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/BoxMullerLogNormalSamplerTest.java
@@ -27,7 +27,7 @@ public class BoxMullerLogNormalSamplerTest {
/**
* Test the constructor with a bad scale.
*/
- @Test(expected=IllegalArgumentException.class)
+ @Test(expected = IllegalArgumentException.class)
public void testConstructorThrowsWithNegativeScale() {
final RestorableUniformRandomProvider rng =
RandomSource.create(RandomSource.SPLIT_MIX_64);
@@ -41,7 +41,7 @@ public class BoxMullerLogNormalSamplerTest {
/**
* Test the constructor with a bad shape.
*/
- @Test(expected=IllegalArgumentException.class)
+ @Test(expected = IllegalArgumentException.class)
public void testConstructorThrowsWithZeroShape() {
final RestorableUniformRandomProvider rng =
RandomSource.create(RandomSource.SPLIT_MIX_64);
diff --git a/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/ChengBetaSamplerTest.java b/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/ChengBetaSamplerTest.java
index 3bc4a38..ea1f6ef 100644
--- a/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/ChengBetaSamplerTest.java
+++ b/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/ChengBetaSamplerTest.java
@@ -27,7 +27,7 @@ public class ChengBetaSamplerTest {
/**
* Test the constructor with a bad alpha.
*/
- @Test(expected=IllegalArgumentException.class)
+ @Test(expected = IllegalArgumentException.class)
public void testConstructorThrowsWithZeroAlpha() {
final RestorableUniformRandomProvider rng =
RandomSource.create(RandomSource.SPLIT_MIX_64);
@@ -41,7 +41,7 @@ public class ChengBetaSamplerTest {
/**
* Test the constructor with a bad beta.
*/
- @Test(expected=IllegalArgumentException.class)
+ @Test(expected = IllegalArgumentException.class)
public void testConstructorThrowsWithZeroBeta() {
final RestorableUniformRandomProvider rng =
RandomSource.create(RandomSource.SPLIT_MIX_64);
diff --git a/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/ContinuousSamplerParametricTest.java b/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/ContinuousSamplerParametricTest.java
index 02dd244..e6bfa81 100644
--- a/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/ContinuousSamplerParametricTest.java
+++ b/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/ContinuousSamplerParametricTest.java
@@ -29,7 +29,7 @@ import org.junit.runners.Parameterized.Parameters;
/**
* Tests for random deviates generators.
*/
-@RunWith(value=Parameterized.class)
+@RunWith(value = Parameterized.class)
public class ContinuousSamplerParametricTest {
/** Sampler under test. */
private final ContinuousSamplerTestData sampler;
@@ -63,9 +63,9 @@ public class ContinuousSamplerParametricTest {
* @param sampleSize Number of random values to generate.
* @param deciles Deciles.
*/
- private void check(long sampleSize,
- ContinuousSampler sampler,
- double[] deciles) {
+ private static void check(long sampleSize,
+ ContinuousSampler sampler,
+ double[] deciles) {
final int numTests = 50;
// Do not change (statistical test assumes that dof = 9).
@@ -107,9 +107,6 @@ public class ContinuousSamplerParametricTest {
for (int k = 0; k < numBins; k++) {
final double diff = observed[k] - expected[k];
chi2 += diff * diff / expected[k];
- // System.out.println("bin[" + k + "]" +
- // " obs=" + observed[k] +
- // " exp=" + expected[k]);
}
// Statistics check.
diff --git a/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/ContinuousSamplerTestData.java b/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/ContinuousSamplerTestData.java
index d4d15d9..8614292 100644
--- a/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/ContinuousSamplerTestData.java
+++ b/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/ContinuousSamplerTestData.java
@@ -25,8 +25,8 @@ class ContinuousSamplerTestData {
private final ContinuousSampler sampler;
private final double[] deciles;
- public ContinuousSamplerTestData(ContinuousSampler sampler,
- double[] deciles) {
+ ContinuousSamplerTestData(ContinuousSampler sampler,
+ double[] deciles) {
this.sampler = sampler;
this.deciles = deciles.clone();
}
diff --git a/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/ContinuousSamplersList.java b/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/ContinuousSamplersList.java
index 4545b1d..2cd8325 100644
--- a/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/ContinuousSamplersList.java
+++ b/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/ContinuousSamplersList.java
@@ -26,7 +26,7 @@ import org.apache.commons.rng.simple.RandomSource;
/**
* List of samplers.
*/
-public class ContinuousSamplersList {
+public final class ContinuousSamplersList {
/** List of all RNGs implemented in the library. */
private static final List<ContinuousSamplerTestData[]> LIST =
new ArrayList<ContinuousSamplerTestData[]>();
@@ -209,8 +209,10 @@ public class ContinuousSamplersList {
add(LIST, new org.apache.commons.math3.distribution.WeibullDistribution(unusedRng, alphaWeibull, betaWeibull),
RandomSource.create(RandomSource.WELL_44497_B));
} catch (Exception e) {
+ // CHECKSTYLE: stop Regexp
System.err.println("Unexpected exception while creating the list of samplers: " + e);
e.printStackTrace(System.err);
+ // CHECKSTYLE: resume Regexp
throw new RuntimeException(e);
}
}
@@ -230,19 +232,19 @@ public class ContinuousSamplersList {
UniformRandomProvider rng) {
final ContinuousSampler inverseMethodSampler =
new InverseTransformContinuousSampler(rng,
- new ContinuousInverseCumulativeProbabilityFunction() {
- @Override
- public double inverseCumulativeProbability(double p) {
- return dist.inverseCumulativeProbability(p);
- }
- @Override
- public String toString() {
- return dist.toString();
- }
- });
- list.add(new ContinuousSamplerTestData[] { new ContinuousSamplerTestData(inverseMethodSampler,
- getDeciles(dist)) });
- }
+ new ContinuousInverseCumulativeProbabilityFunction() {
+ @Override
+ public double inverseCumulativeProbability(double p) {
+ return dist.inverseCumulativeProbability(p);
+ }
+ @Override
+ public String toString() {
+ return dist.toString();
+ }
+ });
+ list.add(new ContinuousSamplerTestData[] {new ContinuousSamplerTestData(inverseMethodSampler,
+ getDeciles(dist))});
+ }
/**
* @param list List of data (one the "parameters" tested by the Junit parametric test).
@@ -252,8 +254,8 @@ public class ContinuousSamplersList {
private static void add(List<ContinuousSamplerTestData[]> list,
final org.apache.commons.math3.distribution.RealDistribution dist,
final ContinuousSampler sampler) {
- list.add(new ContinuousSamplerTestData[] { new ContinuousSamplerTestData(sampler,
- getDeciles(dist)) });
+ list.add(new ContinuousSamplerTestData[] {new ContinuousSamplerTestData(sampler,
+ getDeciles(dist))});
}
/**
diff --git a/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/ContinuousUniformSamplerTest.java b/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/ContinuousUniformSamplerTest.java
index de560a1..ba69c3b 100644
--- a/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/ContinuousUniformSamplerTest.java
+++ b/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/ContinuousUniformSamplerTest.java
@@ -37,7 +37,7 @@ public class ContinuousUniformSamplerTest {
testSampleInRange(rng, high, low);
}
- private static void testSampleInRange(UniformRandomProvider rng,
+ private static void testSampleInRange(UniformRandomProvider rng,
double low, double high) {
ContinuousUniformSampler sampler = new ContinuousUniformSampler(rng, low, high);
final double min = Math.min(low, high);
@@ -47,4 +47,4 @@ public class ContinuousUniformSamplerTest {
Assert.assertTrue("Value not in range", value >= min && value <= max);
}
}
-}
\ No newline at end of file
+}
diff --git a/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/DiscreteSamplerParametricTest.java b/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/DiscreteSamplerParametricTest.java
index d958be4..1c947e7 100644
--- a/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/DiscreteSamplerParametricTest.java
+++ b/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/DiscreteSamplerParametricTest.java
@@ -31,7 +31,7 @@ import org.apache.commons.math3.stat.inference.ChiSquareTest;
/**
* Tests for random deviates generators.
*/
-@RunWith(value=Parameterized.class)
+@RunWith(value = Parameterized.class)
public class DiscreteSamplerParametricTest {
/** Sampler under test. */
private final DiscreteSamplerTestData sampler;
@@ -77,10 +77,10 @@ public class DiscreteSamplerParametricTest {
* @param points Outcomes.
* @param expected Expected counts of the given outcomes.
*/
- private void check(long sampleSize,
- DiscreteSampler sampler,
- int[] points,
- double[] expected) {
+ private static void check(long sampleSize,
+ DiscreteSampler sampler,
+ int[] points,
+ double[] expected) {
final ChiSquareTest chiSquareTest = new ChiSquareTest();
final int numTests = 50;
diff --git a/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/DiscreteSamplerTestData.java b/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/DiscreteSamplerTestData.java
index a34104c..3a7ef85 100644
--- a/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/DiscreteSamplerTestData.java
+++ b/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/DiscreteSamplerTestData.java
@@ -26,9 +26,9 @@ class DiscreteSamplerTestData {
private final int[] points;
private final double[] probabilities;
- public DiscreteSamplerTestData(DiscreteSampler sampler,
- int[] points,
- double[] probabilities) {
+ DiscreteSamplerTestData(DiscreteSampler sampler,
+ int[] points,
+ double[] probabilities) {
this.sampler = sampler;
this.points = points.clone();
this.probabilities = probabilities.clone();
diff --git a/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/DiscreteSamplersList.java b/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/DiscreteSamplersList.java
index c69a853..b021b50 100644
--- a/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/DiscreteSamplersList.java
+++ b/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/DiscreteSamplersList.java
@@ -28,7 +28,7 @@ import org.apache.commons.rng.simple.RandomSource;
/**
* List of samplers.
*/
-public class DiscreteSamplersList {
+public final class DiscreteSamplersList {
/** List of all RNGs implemented in the library. */
private static final List<DiscreteSamplerTestData[]> LIST =
new ArrayList<DiscreteSamplerTestData[]>();
@@ -166,12 +166,14 @@ public class DiscreteSamplersList {
MarsagliaTsangWangDiscreteSampler.createPoissonDistribution(RandomSource.create(RandomSource.XO_RO_SHI_RO_64_SS), veryLargeMeanPoisson));
// Any discrete distribution
- final double[] discreteProbabilities = new double[] { 0.1, 0.2, 0.3, 0.4, 0.5 };
+ final double[] discreteProbabilities = new double[] {0.1, 0.2, 0.3, 0.4, 0.5};
add(LIST, discreteProbabilities,
MarsagliaTsangWangDiscreteSampler.createDiscreteDistribution(RandomSource.create(RandomSource.XO_SHI_RO_512_PLUS), discreteProbabilities));
} catch (Exception e) {
+ // CHECKSTYLE: stop Regexp
System.err.println("Unexpected exception while creating the list of samplers: " + e);
e.printStackTrace(System.err);
+ // CHECKSTYLE: resume Regexp
throw new RuntimeException(e);
}
}
@@ -193,20 +195,20 @@ public class DiscreteSamplersList {
UniformRandomProvider rng) {
final DiscreteSampler inverseMethodSampler =
new InverseTransformDiscreteSampler(rng,
- new DiscreteInverseCumulativeProbabilityFunction() {
- @Override
- public int inverseCumulativeProbability(double p) {
- return dist.inverseCumulativeProbability(p);
- }
- @Override
- public String toString() {
- return dist.toString();
- }
- });
- list.add(new DiscreteSamplerTestData[] { new DiscreteSamplerTestData(inverseMethodSampler,
- points,
- getProbabilities(dist, points)) });
- }
+ new DiscreteInverseCumulativeProbabilityFunction() {
+ @Override
+ public int inverseCumulativeProbability(double p) {
+ return dist.inverseCumulativeProbability(p);
+ }
+ @Override
+ public String toString() {
+ return dist.toString();
+ }
+ });
+ list.add(new DiscreteSamplerTestData[] {new DiscreteSamplerTestData(inverseMethodSampler,
+ points,
+ getProbabilities(dist, points))});
+ }
/**
* @param list List of data (one the "parameters" tested by the Junit parametric test).
@@ -218,9 +220,9 @@ public class DiscreteSamplersList {
final org.apache.commons.math3.distribution.IntegerDistribution dist,
int[] points,
final DiscreteSampler sampler) {
- list.add(new DiscreteSamplerTestData[] { new DiscreteSamplerTestData(sampler,
- points,
- getProbabilities(dist, points)) });
+ list.add(new DiscreteSamplerTestData[] {new DiscreteSamplerTestData(sampler,
+ points,
+ getProbabilities(dist, points))});
}
/**
@@ -231,9 +233,9 @@ public class DiscreteSamplersList {
private static void add(List<DiscreteSamplerTestData[]> list,
final double[] probabilities,
final DiscreteSampler sampler) {
- list.add(new DiscreteSamplerTestData[] { new DiscreteSamplerTestData(sampler,
- MathArrays.natural(probabilities.length),
- probabilities) });
+ list.add(new DiscreteSamplerTestData[] {new DiscreteSamplerTestData(sampler,
+ MathArrays.natural(probabilities.length),
+ probabilities)});
}
/**
diff --git a/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/DiscreteUniformSamplerTest.java b/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/DiscreteUniformSamplerTest.java
index fd5c117..a0ab018 100644
--- a/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/DiscreteUniformSamplerTest.java
+++ b/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/DiscreteUniformSamplerTest.java
@@ -27,7 +27,7 @@ public class DiscreteUniformSamplerTest {
/**
* Test the constructor with a bad range.
*/
- @Test(expected=IllegalArgumentException.class)
+ @Test(expected = IllegalArgumentException.class)
public void testConstructorThrowsWithLowerAboveUpper() {
final int upper = 55;
final int lower = upper + 1;
@@ -35,4 +35,4 @@ public class DiscreteUniformSamplerTest {
@SuppressWarnings("unused")
DiscreteUniformSampler sampler = new DiscreteUniformSampler(rng, lower, upper);
}
-}
\ No newline at end of file
+}
diff --git a/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/GaussianSamplerTest.java b/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/GaussianSamplerTest.java
index 08dcbad..0cc0a61 100644
--- a/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/GaussianSamplerTest.java
+++ b/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/GaussianSamplerTest.java
@@ -27,7 +27,7 @@ public class GaussianSamplerTest {
/**
* Test the constructor with a bad standard deviation.
*/
- @Test(expected=IllegalArgumentException.class)
+ @Test(expected = IllegalArgumentException.class)
public void testConstructorThrowsWithZeroStandardDeviation() {
final RestorableUniformRandomProvider rng =
RandomSource.create(RandomSource.SPLIT_MIX_64);
diff --git a/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/InverseTransformParetoSamplerTest.java b/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/InverseTransformParetoSamplerTest.java
index 76c6851..0119ed2 100644
--- a/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/InverseTransformParetoSamplerTest.java
+++ b/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/InverseTransformParetoSamplerTest.java
@@ -27,7 +27,7 @@ public class InverseTransformParetoSamplerTest {
/**
* Test the constructor with a bad scale.
*/
- @Test(expected=IllegalArgumentException.class)
+ @Test(expected = IllegalArgumentException.class)
public void testConstructorThrowsWithZeroScale() {
final RestorableUniformRandomProvider rng =
RandomSource.create(RandomSource.SPLIT_MIX_64);
@@ -41,7 +41,7 @@ public class InverseTransformParetoSamplerTest {
/**
* Test the constructor with a bad shape.
*/
- @Test(expected=IllegalArgumentException.class)
+ @Test(expected = IllegalArgumentException.class)
public void testConstructorThrowsWithZeroShape() {
final RestorableUniformRandomProvider rng =
RandomSource.create(RandomSource.SPLIT_MIX_64);
diff --git a/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/KempSmallMeanPoissonSamplerTest.java b/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/KempSmallMeanPoissonSamplerTest.java
index 83cdb88..013c1c0 100644
--- a/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/KempSmallMeanPoissonSamplerTest.java
+++ b/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/KempSmallMeanPoissonSamplerTest.java
@@ -187,6 +187,7 @@ public class KempSmallMeanPoissonSamplerTest {
this.value = value;
}
+ // CHECKSTYLE: stop all
public long nextLong(long n) { return 0; }
public long nextLong() { return 0; }
public int nextInt(int n) { return 0; }
@@ -195,5 +196,6 @@ public class KempSmallMeanPoissonSamplerTest {
public void nextBytes(byte[] bytes, int start, int len) {}
public void nextBytes(byte[] bytes) {}
public boolean nextBoolean() { return false; }
+ // CHECKSTYLE: resume all
}
}
diff --git a/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/LargeMeanPoissonSamplerTest.java b/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/LargeMeanPoissonSamplerTest.java
index 13b4173..63c1f55 100644
--- a/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/LargeMeanPoissonSamplerTest.java
+++ b/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/LargeMeanPoissonSamplerTest.java
@@ -34,7 +34,7 @@ public class LargeMeanPoissonSamplerTest {
/**
* Test the constructor with a bad mean.
*/
- @Test(expected=IllegalArgumentException.class)
+ @Test(expected = IllegalArgumentException.class)
public void testConstructorThrowsWithMeanLargerThanUpperBound() {
final RestorableUniformRandomProvider rng =
RandomSource.create(RandomSource.SPLIT_MIX_64);
@@ -46,7 +46,7 @@ public class LargeMeanPoissonSamplerTest {
/**
* Test the constructor with a mean below 1.
*/
- @Test(expected=IllegalArgumentException.class)
+ @Test(expected = IllegalArgumentException.class)
public void testConstructorThrowsWithMeanBelow1() {
final RestorableUniformRandomProvider rng =
RandomSource.create(RandomSource.SPLIT_MIX_64);
@@ -58,7 +58,7 @@ public class LargeMeanPoissonSamplerTest {
/**
* Test the constructor using the state with a negative fractional mean.
*/
- @Test(expected=IllegalArgumentException.class)
+ @Test(expected = IllegalArgumentException.class)
public void testConstructorThrowsWithStateAndNegativeFractionalMean() {
final RestorableUniformRandomProvider rng =
RandomSource.create(RandomSource.SPLIT_MIX_64);
@@ -70,7 +70,7 @@ public class LargeMeanPoissonSamplerTest {
/**
* Test the constructor with a non-fractional mean.
*/
- @Test(expected=IllegalArgumentException.class)
+ @Test(expected = IllegalArgumentException.class)
public void testConstructorThrowsWithStateAndNonFractionalMean() {
final RestorableUniformRandomProvider rng =
RandomSource.create(RandomSource.SPLIT_MIX_64);
@@ -82,7 +82,7 @@ public class LargeMeanPoissonSamplerTest {
/**
* Test the constructor with fractional mean of 1.
*/
- @Test(expected=IllegalArgumentException.class)
+ @Test(expected = IllegalArgumentException.class)
public void testConstructorThrowsWithStateAndFractionalMeanOne() {
final RestorableUniformRandomProvider rng =
RandomSource.create(RandomSource.SPLIT_MIX_64);
diff --git a/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/LogNormalSamplerTest.java b/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/LogNormalSamplerTest.java
index f4d4dcb..104e552 100644
--- a/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/LogNormalSamplerTest.java
+++ b/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/LogNormalSamplerTest.java
@@ -27,7 +27,7 @@ public class LogNormalSamplerTest {
/**
* Test the constructor with a bad shape.
*/
- @Test(expected=IllegalArgumentException.class)
+ @Test(expected = IllegalArgumentException.class)
public void testConstructorThrowsWithNegativeScale() {
final RestorableUniformRandomProvider rng =
RandomSource.create(RandomSource.SPLIT_MIX_64);
@@ -42,7 +42,7 @@ public class LogNormalSamplerTest {
/**
* Test the constructor with a bad shape.
*/
- @Test(expected=IllegalArgumentException.class)
+ @Test(expected = IllegalArgumentException.class)
public void testConstructorThrowsWithZeroShape() {
final RestorableUniformRandomProvider rng =
RandomSource.create(RandomSource.SPLIT_MIX_64);
diff --git a/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/MarsagliaTsangWangDiscreteSamplerTest.java b/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/MarsagliaTsangWangDiscreteSamplerTest.java
index bb17c9e..5ec43df 100644
--- a/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/MarsagliaTsangWangDiscreteSamplerTest.java
+++ b/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/MarsagliaTsangWangDiscreteSamplerTest.java
@@ -31,37 +31,37 @@ import org.junit.Test;
* <p>Statistical testing of the sampler is performed using entries in {@link DiscreteSamplersList}.</p>
*/
public class MarsagliaTsangWangDiscreteSamplerTest {
- @Test(expected=IllegalArgumentException.class)
+ @Test(expected = IllegalArgumentException.class)
public void testCreateDiscreteDistributionThrowsWithNullProbabilites() {
createDiscreteDistributionSampler(null);
}
- @Test(expected=IllegalArgumentException.class)
+ @Test(expected = IllegalArgumentException.class)
public void testCreateDiscreteDistributionThrowsWithZeroLengthProbabilites() {
createDiscreteDistributionSampler(new double[0]);
}
- @Test(expected=IllegalArgumentException.class)
+ @Test(expected = IllegalArgumentException.class)
public void testCreateDiscreteDistributionThrowsWithNegativeProbabilites() {
- createDiscreteDistributionSampler(new double[] { -1, 0.1, 0.2 });
+ createDiscreteDistributionSampler(new double[] {-1, 0.1, 0.2});
}
- @Test(expected=IllegalArgumentException.class)
+ @Test(expected = IllegalArgumentException.class)
public void testCreateDiscreteDistributionThrowsWithNaNProbabilites() {
- createDiscreteDistributionSampler(new double[] { 0.1, Double.NaN, 0.2 });
+ createDiscreteDistributionSampler(new double[] {0.1, Double.NaN, 0.2});
}
- @Test(expected=IllegalArgumentException.class)
+ @Test(expected = IllegalArgumentException.class)
public void testCreateDiscreteDistributionThrowsWithInfiniteProbabilites() {
- createDiscreteDistributionSampler(new double[] { 0.1, Double.POSITIVE_INFINITY, 0.2 });
+ createDiscreteDistributionSampler(new double[] {0.1, Double.POSITIVE_INFINITY, 0.2});
}
- @Test(expected=IllegalArgumentException.class)
+ @Test(expected = IllegalArgumentException.class)
public void testCreateDiscreteDistributionThrowsWithInfiniteSumProbabilites() {
- createDiscreteDistributionSampler(new double[] { Double.MAX_VALUE, Double.MAX_VALUE });
+ createDiscreteDistributionSampler(new double[] {Double.MAX_VALUE, Double.MAX_VALUE});
}
- @Test(expected=IllegalArgumentException.class)
+ @Test(expected = IllegalArgumentException.class)
public void testCreateDiscreteDistributionThrowsWithZeroSumProbabilites() {
createDiscreteDistributionSampler(new double[4]);
}
@@ -71,9 +71,9 @@ public class MarsagliaTsangWangDiscreteSamplerTest {
*/
@Test
public void testToString() {
- final DiscreteSampler sampler = createDiscreteDistributionSampler(new double[] { 0.5, 0.5 });
+ final DiscreteSampler sampler = createDiscreteDistributionSampler(new double[] {0.5, 0.5});
String text = sampler.toString();
- for (String item : new String[] { "Marsaglia", "Tsang", "Wang" }) {
+ for (String item : new String[] {"Marsaglia", "Tsang", "Wang"}) {
Assert.assertTrue("toString missing: " + item, text.contains(item));
}
}
@@ -127,7 +127,7 @@ public class MarsagliaTsangWangDiscreteSamplerTest {
final int t4 = t3 + (n4 << 6);
// Create values under the limits and bit shift by 2 to reverse what the sampler does.
- final int[] values = new int[] { 0, t1, t2, t3, t4, 0xffffffff };
+ final int[] values = new int[] {0, t1, t2, t3, t4, 0xffffffff};
for (int i = 0; i < values.length; i++) {
values[i] <<= 2;
}
@@ -187,7 +187,7 @@ public class MarsagliaTsangWangDiscreteSamplerTest {
}
// First test the table is completely filled to 2^30
- final UniformRandomProvider dummyRng = new FixedSequenceIntProvider(new int[] { 0xffffffff});
+ final UniformRandomProvider dummyRng = new FixedSequenceIntProvider(new int[] {0xffffffff});
final MarsagliaTsangWangDiscreteSampler dummySampler = MarsagliaTsangWangDiscreteSampler.createDiscreteDistribution(dummyRng, probabilities);
// This will throw if the table is incomplete as it hits the upper limit
dummySampler.sample();
@@ -247,7 +247,7 @@ public class MarsagliaTsangWangDiscreteSamplerTest {
// Worst case scenario is a uniform distribution of 2^k samples each with the highest
// mask set for base 64 digits.
// The max number of samples: 2^k
- final int maxSamples = (1 << k);
+ final int maxSamples = 1 << k;
// The highest value for each sample:
// 2^30 / 2^k = 2^(30-k)
@@ -550,7 +550,7 @@ public class MarsagliaTsangWangDiscreteSamplerTest {
* search for the last probability of the Binomial distribution.
*/
@Test
- public void testCreateBinomialDistributionWithProbability0_5() {
+ public void testCreateBinomialDistributionWithProbability50Percent() {
final UniformRandomProvider rng = new FixedRNG();
final int trials = 10;
final double p = 0.5;
@@ -560,7 +560,7 @@ public class MarsagliaTsangWangDiscreteSamplerTest {
}
/**
- * Test the sampler with a probability that requires inversion has the same name for
+ * Test the sampler with a probability that requires inversion has the same name for
* {@link Object#toString()}.
*/
@Test
diff --git a/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/PoissonSamplerCacheTest.java b/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/PoissonSamplerCacheTest.java
index f38d109..4fd8c0d 100644
--- a/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/PoissonSamplerCacheTest.java
+++ b/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/PoissonSamplerCacheTest.java
@@ -90,7 +90,7 @@ public class PoissonSamplerCacheTest {
/**
* Test the cache requires a range with {@code max >= min}.
*/
- @Test(expected=IllegalArgumentException.class)
+ @Test(expected = IllegalArgumentException.class)
public void testConstructorThrowsWhenMaxIsLessThanMin() {
final double min = PoissonSampler.PIVOT;
final double max = Math.nextAfter(min, -1);
@@ -176,7 +176,7 @@ public class PoissonSamplerCacheTest {
/**
* Test the cache requires a range with {@code max >= min}.
*/
- @Test(expected=IllegalArgumentException.class)
+ @Test(expected = IllegalArgumentException.class)
public void testWithRangeConstructorThrowsWhenMaxIsLessThanMin() {
final double min = PoissonSampler.PIVOT;
final double max = Math.nextAfter(min, -1);
@@ -236,7 +236,7 @@ public class PoissonSamplerCacheTest {
*
* <p>Note this test actually tests the SmallMeanPoissonSampler throws.
*/
- @Test(expected=IllegalArgumentException.class)
+ @Test(expected = IllegalArgumentException.class)
public void testCreatePoissonSamplerThrowsWithZeroMean() {
final RestorableUniformRandomProvider rng =
RandomSource.create(RandomSource.SPLIT_MIX_64);
@@ -247,7 +247,7 @@ public class PoissonSamplerCacheTest {
/**
* Test createPoissonSampler() with a mean that is too large.
*/
- @Test(expected=IllegalArgumentException.class)
+ @Test(expected = IllegalArgumentException.class)
public void testCreatePoissonSamplerThrowsWithNonIntegerMean() {
final RestorableUniformRandomProvider rng =
RandomSource.create(RandomSource.SPLIT_MIX_64);
@@ -346,8 +346,7 @@ public class PoissonSamplerCacheTest {
* @return the poisson sampler cache
*/
private static PoissonSamplerCache createPoissonSamplerCache(double minMean,
- double maxMean)
- {
+ double maxMean) {
return new PoissonSamplerCache(minMean, maxMean);
}
@@ -356,8 +355,7 @@ public class PoissonSamplerCacheTest {
*
* @return the poisson sampler cache
*/
- private static PoissonSamplerCache createPoissonSamplerCache()
- {
+ private static PoissonSamplerCache createPoissonSamplerCache() {
return new PoissonSamplerCache(PoissonSampler.PIVOT,
PoissonSampler.PIVOT + 10);
}
@@ -379,8 +377,9 @@ public class PoissonSamplerCacheTest {
double mean) {
final DiscreteSampler s1 = new PoissonSampler(rng1, mean);
final DiscreteSampler s2 = cache.createPoissonSampler(rng2, mean);
- for (int j = 0; j < 10; j++)
+ for (int j = 0; j < 10; j++) {
Assert.assertEquals(s1.sample(), s2.sample());
+ }
}
/**
diff --git a/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/RejectionInversionZipfSamplerTest.java b/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/RejectionInversionZipfSamplerTest.java
index 08afc16..d022e3e 100644
--- a/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/RejectionInversionZipfSamplerTest.java
+++ b/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/RejectionInversionZipfSamplerTest.java
@@ -27,7 +27,7 @@ public class RejectionInversionZipfSamplerTest {
/**
* Test the constructor with a bad number of elements.
*/
- @Test(expected=IllegalArgumentException.class)
+ @Test(expected = IllegalArgumentException.class)
public void testConstructorThrowsWithZeroNumberOfElements() {
final RestorableUniformRandomProvider rng =
RandomSource.create(RandomSource.SPLIT_MIX_64);
@@ -41,7 +41,7 @@ public class RejectionInversionZipfSamplerTest {
/**
* Test the constructor with a bad exponent.
*/
- @Test(expected=IllegalArgumentException.class)
+ @Test(expected = IllegalArgumentException.class)
public void testConstructorThrowsWithZeroExponent() {
final RestorableUniformRandomProvider rng =
RandomSource.create(RandomSource.SPLIT_MIX_64);
diff --git a/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/SmallMeanPoissonSamplerTest.java b/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/SmallMeanPoissonSamplerTest.java
index d8db267..5b22785 100644
--- a/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/SmallMeanPoissonSamplerTest.java
+++ b/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/SmallMeanPoissonSamplerTest.java
@@ -28,7 +28,7 @@ public class SmallMeanPoissonSamplerTest {
/**
* Test the constructor with a bad mean.
*/
- @Test(expected=IllegalArgumentException.class)
+ @Test(expected = IllegalArgumentException.class)
public void testConstructorThrowsWithMeanThatSetsProbabilityP0ToZero() {
final UniformRandomProvider rng =
RandomSource.create(RandomSource.SPLIT_MIX_64);
@@ -43,7 +43,7 @@ public class SmallMeanPoissonSamplerTest {
/**
* Test the constructor with a bad mean.
*/
- @Test(expected=IllegalArgumentException.class)
+ @Test(expected = IllegalArgumentException.class)
public void testConstructorThrowsWithZeroMean() {
final UniformRandomProvider rng =
RandomSource.create(RandomSource.SPLIT_MIX_64);
@@ -59,6 +59,7 @@ public class SmallMeanPoissonSamplerTest {
public void testSampleUpperBounds() {
// If the nextDouble() is always 1 then the sample will hit the upper bounds
final UniformRandomProvider rng = new UniformRandomProvider() {
+ // CHECKSTYLE: stop all
public long nextLong(long n) { return 0; }
public long nextLong() { return 0; }
public int nextInt(int n) { return 0; }
@@ -68,8 +69,9 @@ public class SmallMeanPoissonSamplerTest {
public void nextBytes(byte[] bytes, int start, int len) {}
public void nextBytes(byte[] bytes) {}
public boolean nextBoolean() { return false; }
+ // CHECKSTYLE: resume all
};
- for (double mean : new double[] { 0.5, 1, 1.5, 2.2 }) {
+ for (double mean : new double[] {0.5, 1, 1.5, 2.2}) {
final SmallMeanPoissonSampler sampler = new SmallMeanPoissonSampler(rng, mean);
final int expected = (int) Math.ceil(1000 * mean);
Assert.assertEquals(expected, sampler.sample());
diff --git a/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/ZigguratNormalizedGaussianSamplerTest.java b/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/ZigguratNormalizedGaussianSamplerTest.java
index 3718111..e9a3657 100644
--- a/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/ZigguratNormalizedGaussianSamplerTest.java
+++ b/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/ZigguratNormalizedGaussianSamplerTest.java
@@ -29,6 +29,7 @@ public class ZigguratNormalizedGaussianSamplerTest {
// A bad implementation whose only purpose is to force access
// to the rarest branch.
final UniformRandomProvider bad = new UniformRandomProvider() {
+ // CHECKSTYLE: stop all
public long nextLong(long n) { return 0; }
public long nextLong() { return Long.MAX_VALUE; }
public int nextInt(int n) { return 0; }
@@ -38,6 +39,7 @@ public class ZigguratNormalizedGaussianSamplerTest {
public void nextBytes(byte[] bytes, int start, int len) {}
public void nextBytes(byte[] bytes) {}
public boolean nextBoolean() { return false; }
+ // CHECKSTYLE: resume all
};
// Infinite loop (in v1.1).
diff --git a/commons-rng-simple/src/test/java/org/apache/commons/rng/simple/ProvidersCommonParametricTest.java b/commons-rng-simple/src/test/java/org/apache/commons/rng/simple/ProvidersCommonParametricTest.java
index 8b58ec4..f54345f 100644
--- a/commons-rng-simple/src/test/java/org/apache/commons/rng/simple/ProvidersCommonParametricTest.java
+++ b/commons-rng-simple/src/test/java/org/apache/commons/rng/simple/ProvidersCommonParametricTest.java
@@ -42,7 +42,7 @@ import org.apache.commons.rng.core.RandomProviderDefaultState;
/**
* Tests which all generators must pass.
*/
-@RunWith(value=Parameterized.class)
+@RunWith(value = Parameterized.class)
public class ProvidersCommonParametricTest {
/** RNG under test. */
private final UniformRandomProvider generator;
@@ -72,7 +72,7 @@ public class ProvidersCommonParametricTest {
// Seeding tests.
- @Test(expected=UnsupportedOperationException.class)
+ @Test(expected = UnsupportedOperationException.class)
public void testUnsupportedSeedType() {
final byte seed = 123;
RandomSource.create(originalSource, seed, originalArgs);
@@ -82,16 +82,16 @@ public class ProvidersCommonParametricTest {
public void testAllSeedTypes() {
final Integer intSeed = -12131415;
final Long longSeed = -1213141516171819L;
- final int[] intArraySeed = new int[] { 0, 11, -22, 33, -44, 55, -66, 77, -88, 99 };
- final long[] longArraySeed = new long[] { 11111L, -222222L, 3333333L, -44444444L };
- final byte[] byteArraySeed = new byte[] { -128, -91, -45, -32, -1, 0, 11, 23, 54, 88, 127 };
-
- final Object[] seeds = new Object[] { null,
- intSeed,
- longSeed,
- intArraySeed,
- longArraySeed,
- byteArraySeed };
+ final int[] intArraySeed = new int[] {0, 11, -22, 33, -44, 55, -66, 77, -88, 99};
+ final long[] longArraySeed = new long[] {11111L, -222222L, 3333333L, -44444444L};
+ final byte[] byteArraySeed = new byte[] {-128, -91, -45, -32, -1, 0, 11, 23, 54, 88, 127};
+
+ final Object[] seeds = new Object[] {null,
+ intSeed,
+ longSeed,
+ intArraySeed,
+ longArraySeed,
+ byteArraySeed};
int nonNativeSeedCount = 0;
int seedCount = 0;
diff --git a/commons-rng-simple/src/test/java/org/apache/commons/rng/simple/ProvidersList.java b/commons-rng-simple/src/test/java/org/apache/commons/rng/simple/ProvidersList.java
index f06df85..381b672 100644
--- a/commons-rng-simple/src/test/java/org/apache/commons/rng/simple/ProvidersList.java
+++ b/commons-rng-simple/src/test/java/org/apache/commons/rng/simple/ProvidersList.java
@@ -30,7 +30,7 @@ import java.util.Collections;
* @see #list32()
* @see #list64()
*/
-public class ProvidersList {
+public final class ProvidersList {
/** List of all RNGs implemented in the library. */
private static final List<Data[]> LIST = new ArrayList<Data[]>();
/** List of 32-bits based RNGs. */
@@ -42,35 +42,35 @@ public class ProvidersList {
try {
// "int"-based RNGs.
add(LIST32, RandomSource.JDK, -122333444455555L);
- add(LIST32, RandomSource.MT, new int[] { -123, -234, -345 });
- add(LIST32, RandomSource.WELL_512_A, new int[] { -23, -34, -45 });
- add(LIST32, RandomSource.WELL_1024_A, new int[] { -1234, -2345, -3456 });
- add(LIST32, RandomSource.WELL_19937_A, new int[] { -2123, -3234, -4345 });
- add(LIST32, RandomSource.WELL_19937_C, new int[] { -123, -234, -345, -456 });
- add(LIST32, RandomSource.WELL_44497_A, new int[] { -12345, -23456, -34567 });
- add(LIST32, RandomSource.WELL_44497_B, new int[] { 123, 234, 345 });
- add(LIST32, RandomSource.ISAAC, new int[] { 123, -234, 345, -456 });
- add(LIST32, RandomSource.MWC_256, new int[] { 12, -1234, -3456, 45678 });
- add(LIST32, RandomSource.KISS, new int[] { 12, 1234, 23456, 345678 });
- add(LIST32, RandomSource.XO_RO_SHI_RO_64_S, new int[] { 42, 12345 });
- add(LIST32, RandomSource.XO_RO_SHI_RO_64_SS, new int[] { 78942, 134 });
- add(LIST32, RandomSource.XO_SHI_RO_128_PLUS, new int[] { 565642, 1234, 4534 });
- add(LIST32, RandomSource.XO_SHI_RO_128_SS, new int[] { 89, 1234, 6787 });
+ add(LIST32, RandomSource.MT, new int[] {-123, -234, -345});
+ add(LIST32, RandomSource.WELL_512_A, new int[] {-23, -34, -45});
+ add(LIST32, RandomSource.WELL_1024_A, new int[] {-1234, -2345, -3456});
+ add(LIST32, RandomSource.WELL_19937_A, new int[] {-2123, -3234, -4345});
+ add(LIST32, RandomSource.WELL_19937_C, new int[] {-123, -234, -345, -456});
+ add(LIST32, RandomSource.WELL_44497_A, new int[] {-12345, -23456, -34567});
+ add(LIST32, RandomSource.WELL_44497_B, new int[] {123, 234, 345});
+ add(LIST32, RandomSource.ISAAC, new int[] {123, -234, 345, -456});
+ add(LIST32, RandomSource.MWC_256, new int[] {12, -1234, -3456, 45678});
+ add(LIST32, RandomSource.KISS, new int[] {12, 1234, 23456, 345678});
+ add(LIST32, RandomSource.XO_RO_SHI_RO_64_S, new int[] {42, 12345});
+ add(LIST32, RandomSource.XO_RO_SHI_RO_64_SS, new int[] {78942, 134});
+ add(LIST32, RandomSource.XO_SHI_RO_128_PLUS, new int[] {565642, 1234, 4534});
+ add(LIST32, RandomSource.XO_SHI_RO_128_SS, new int[] {89, 1234, 6787});
// ... add more here.
// "long"-based RNGs.
add(LIST64, RandomSource.SPLIT_MIX_64, -988777666655555L);
- add(LIST64, RandomSource.XOR_SHIFT_1024_S, new long[] { 123456L, 234567L, -345678L });
- add(LIST64, RandomSource.XOR_SHIFT_1024_S_PHI, new long[] { -234567L, -345678L, 3456789L });
+ add(LIST64, RandomSource.XOR_SHIFT_1024_S, new long[] {123456L, 234567L, -345678L});
+ add(LIST64, RandomSource.XOR_SHIFT_1024_S_PHI, new long[] {-234567L, -345678L, 3456789L});
add(LIST64, RandomSource.TWO_CMRES, 55443322);
add(LIST64, RandomSource.TWO_CMRES_SELECT, -987654321, 5, 8);
- add(LIST64, RandomSource.MT_64, new long[] { 1234567L, 2345678L, -3456789L });
- add(LIST64, RandomSource.XO_RO_SHI_RO_128_PLUS, new long[] { 55646L, -456659L, 565656L });
- add(LIST64, RandomSource.XO_RO_SHI_RO_128_SS, new long[] { 45655L, 5454544L, 4564659L });
- add(LIST64, RandomSource.XO_SHI_RO_256_PLUS, new long[] { 11222L, -568989L, -456789L });
- add(LIST64, RandomSource.XO_SHI_RO_256_SS, new long[] { 98765L, -2345678L, -3456789L });
- add(LIST64, RandomSource.XO_SHI_RO_512_PLUS, new long[] { 89932L, -545669L, 4564689L });
- add(LIST64, RandomSource.XO_SHI_RO_512_SS, new long[] { 123L, -654654L, 45646789L });
+ add(LIST64, RandomSource.MT_64, new long[] {1234567L, 2345678L, -3456789L});
+ add(LIST64, RandomSource.XO_RO_SHI_RO_128_PLUS, new long[] {55646L, -456659L, 565656L});
+ add(LIST64, RandomSource.XO_RO_SHI_RO_128_SS, new long[] {45655L, 5454544L, 4564659L});
+ add(LIST64, RandomSource.XO_SHI_RO_256_PLUS, new long[] {11222L, -568989L, -456789L});
+ add(LIST64, RandomSource.XO_SHI_RO_256_SS, new long[] {98765L, -2345678L, -3456789L});
+ add(LIST64, RandomSource.XO_SHI_RO_512_PLUS, new long[] {89932L, -545669L, 4564689L});
+ add(LIST64, RandomSource.XO_SHI_RO_512_SS, new long[] {123L, -654654L, 45646789L});
// ... add more here.
// Do not modify the remaining statements.
@@ -78,8 +78,10 @@ public class ProvidersList {
LIST.addAll(LIST32);
LIST.addAll(LIST64);
} catch (Exception e) {
+ // CHECKSTYLE: stop Regexp
System.err.println("Unexpected exception while creating the list of generators: " + e);
e.printStackTrace(System.err);
+ // CHECKSTYLE: resume Regexp
throw new RuntimeException(e);
}
}
@@ -95,12 +97,12 @@ public class ProvidersList {
*/
private static void add(List<Data[]> list,
RandomSource source,
- Object ... data) {
+ Object... data) {
final RandomSource rng = source;
final Object seed = data.length > 0 ? data[0] : null;
final Object[] args = data.length > 1 ? Arrays.copyOfRange(data, 1, data.length) : null;
- list.add(new Data[] { new Data(rng, seed, args) });
+ list.add(new Data[] {new Data(rng, seed, args)});
}
/**
diff --git a/commons-rng-simple/src/test/java/org/apache/commons/rng/simple/RandomAssert.java b/commons-rng-simple/src/test/java/org/apache/commons/rng/simple/RandomAssert.java
index f96ac87..3b09753 100644
--- a/commons-rng-simple/src/test/java/org/apache/commons/rng/simple/RandomAssert.java
+++ b/commons-rng-simple/src/test/java/org/apache/commons/rng/simple/RandomAssert.java
@@ -22,7 +22,12 @@ import org.junit.Assert;
import org.apache.commons.rng.UniformRandomProvider;
-public class RandomAssert {
+public final class RandomAssert {
+ /**
+ * Class contains only static methods.
+ */
+ private RandomAssert() {}
+
/**
* Exercise all methods from the UniformRandomProvider interface, and
* ensure that the two generators produce the same sequence.
diff --git a/commons-rng-simple/src/test/java/org/apache/commons/rng/simple/ThreadLocalRandomSourceTest.java b/commons-rng-simple/src/test/java/org/apache/commons/rng/simple/ThreadLocalRandomSourceTest.java
index bf54ff6..59cb6fb 100644
--- a/commons-rng-simple/src/test/java/org/apache/commons/rng/simple/ThreadLocalRandomSourceTest.java
+++ b/commons-rng-simple/src/test/java/org/apache/commons/rng/simple/ThreadLocalRandomSourceTest.java
@@ -44,12 +44,12 @@ public class ThreadLocalRandomSourceTest {
toIgnore = EnumSet.of(RandomSource.TWO_CMRES_SELECT);
}
- @Test(expected=IllegalArgumentException.class)
+ @Test(expected = IllegalArgumentException.class)
public void testCurrentThrowsForNullRandomSource() {
ThreadLocalRandomSource.current(null);
}
- //@Test(expected=IllegalArgumentException.class)
+ //@Test(expected = IllegalArgumentException.class)
public void testCurrentThrowsForRandomSourceWithDataArguments() {
ThreadLocalRandomSource.current(RandomSource.TWO_CMRES_SELECT);
}
diff --git a/commons-rng-simple/src/test/java/org/apache/commons/rng/simple/internal/NativeSeedTypeParametricTest.java b/commons-rng-simple/src/test/java/org/apache/commons/rng/simple/internal/NativeSeedTypeParametricTest.java
index 1f790aa..9a2ebf3 100644
--- a/commons-rng-simple/src/test/java/org/apache/commons/rng/simple/internal/NativeSeedTypeParametricTest.java
+++ b/commons-rng-simple/src/test/java/org/apache/commons/rng/simple/internal/NativeSeedTypeParametricTest.java
@@ -29,7 +29,7 @@ import java.lang.reflect.Array;
* ensures that a seed can be created or converted from any supported input seed to each
* supported native seed type.
*/
-@RunWith(value=Parameterized.class)
+@RunWith(value = Parameterized.class)
public class NativeSeedTypeParametricTest {
/** This is a list of the class types that are supported native seeds. */
private static final Object[] SUPPORTED_NATIVE_TYPES = {
@@ -42,9 +42,9 @@ public class NativeSeedTypeParametricTest {
private static final Object[] SUPPORTED_SEEDS = {
Integer.valueOf(1),
Long.valueOf(2),
- new int[] { 3, 4, 5 },
- new long[] { 6, 7, 8 },
- new byte[] { 9, 10, 11 },
+ new int[] {3, 4, 5},
+ new long[] {6, 7, 8},
+ new byte[] {9, 10, 11},
};
/** Example unsupported seeds for conversion to a native seed type. */
private static final Object[] UNSUPPORTED_SEEDS = {
@@ -58,6 +58,16 @@ public class NativeSeedTypeParametricTest {
private final Class<?> type;
/**
+ * Initializes the test instance.
+ *
+ * @param type The type of the native seed.
+ */
+ public NativeSeedTypeParametricTest(Class<?> type) {
+ this.type = type;
+ nativeSeedType = findNativeSeedType(type);
+ }
+
+ /**
* Gets the supported native seed types.
*
* @return the types
@@ -73,16 +83,6 @@ public class NativeSeedTypeParametricTest {
}
/**
- * Initializes the test instance.
- *
- * @param type The type of the native seed.
- */
- public NativeSeedTypeParametricTest(Class<?> type) {
- this.type = type;
- nativeSeedType = findNativeSeedType(type);
- }
-
- /**
* Creates the native seed type.
*
* @param type Class of the native seed.
diff --git a/commons-rng-simple/src/test/java/org/apache/commons/rng/simple/internal/RandomSourceInternalParametricTest.java b/commons-rng-simple/src/test/java/org/apache/commons/rng/simple/internal/RandomSourceInternalParametricTest.java
index ad2355c..69736f2 100644
--- a/commons-rng-simple/src/test/java/org/apache/commons/rng/simple/internal/RandomSourceInternalParametricTest.java
+++ b/commons-rng-simple/src/test/java/org/apache/commons/rng/simple/internal/RandomSourceInternalParametricTest.java
@@ -28,15 +28,15 @@ import org.junit.runners.Parameterized.Parameters;
* ensures that all random sources can create a seed or convert any supported seed to the
* correct type for the constructor.
*/
-@RunWith(value=Parameterized.class)
+@RunWith(value = Parameterized.class)
public class RandomSourceInternalParametricTest {
/** The supported seeds for conversion to a native seed type. */
private static final Object[] SUPPORTED_SEEDS = {
Integer.valueOf(1),
Long.valueOf(2),
- new int[] { 3, 4, 5 },
- new long[] { 6, 7, 8 },
- new byte[] { 9, 10, 11 },
+ new int[] {3, 4, 5},
+ new long[] {6, 7, 8},
+ new byte[] {9, 10, 11},
};
/** Example unsupported seeds for conversion to a native seed type. */
private static final Object[] UNSUPPORTED_SEEDS = {
diff --git a/pom.xml b/pom.xml
index bd4d214..f62215c 100644
--- a/pom.xml
+++ b/pom.xml
@@ -584,7 +584,7 @@
</dependency>
</dependencies>
<configuration>
- <includeTestSourceDirectory>false</includeTestSourceDirectory>
+ <includeTestSourceDirectory>true</includeTestSourceDirectory>
<configLocation>${rng.parent.dir}/src/main/resources/checkstyle/checkstyle.xml</configLocation>
<headerLocation>${rng.parent.dir}/src/main/resources/checkstyle/license-header.txt</headerLocation>
<suppressionsLocation>${rng.parent.dir}/src/main/resources/checkstyle/checkstyle-suppressions.xml</suppressionsLocation>
diff --git a/src/main/resources/checkstyle/checkstyle-suppressions.xml b/src/main/resources/checkstyle/checkstyle-suppressions.xml
index 764a4f6..647fc7e 100644
--- a/src/main/resources/checkstyle/checkstyle-suppressions.xml
+++ b/src/main/resources/checkstyle/checkstyle-suppressions.xml
@@ -22,4 +22,11 @@
<!-- Special cases with many parameters for the constructor. -->
<suppress checks="ParameterNumber" files="[\\/]LargeMeanPoissonSampler\.java$" />
<suppress checks="ParameterNumber" files="source64[\\/].*XoShiRo512.*\.java$" />
+ <!-- Be more lenient on tests. -->
+ <suppress checks="Javadoc" files=".*[/\\]test[/\\].*" />
+ <suppress checks="MultipleStringLiterals" files=".*[/\\]test[/\\].*" />
+ <suppress checks="DesignForExtension" files=".*[/\\]test[/\\].*" />
+ <suppress checks="LineLength" files=".*[/\\]test[/\\].*" />
+ <suppress checks="IllegalCatch" files=".*[/\\]test[/\\].*" />
+ <suppress checks="MethodLength" files="(MersenneTwister64|Well44497[ab]|MultiplyWithCarry256)Test" />
</suppressions>