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 81639b07 Formatting
81639b07 is described below
commit 81639b07d5b79c276865c2d66f73bb2d7adc3e54
Author: aherbert <[email protected]>
AuthorDate: Mon May 23 13:21:24 2022 +0100
Formatting
---
.../distribution/AliasMethodDiscreteSamplerTest.java | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git
a/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/AliasMethodDiscreteSamplerTest.java
b/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/AliasMethodDiscreteSamplerTest.java
index a7211614..866968d6 100644
---
a/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/AliasMethodDiscreteSamplerTest.java
+++
b/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/AliasMethodDiscreteSamplerTest.java
@@ -123,7 +123,7 @@ class AliasMethodDiscreteSamplerTest {
*/
@Test
void testNonUniformSamplesWithProbabilities() {
- final double[] expected = {0.1, 0.2, 0.3, 0.1, 0.3 };
+ final double[] expected = {0.1, 0.2, 0.3, 0.1, 0.3};
checkSamples(expected);
}
@@ -133,7 +133,7 @@ class AliasMethodDiscreteSamplerTest {
*/
@Test
void testNonUniformSamplesWithProbabilitiesWithDefaultFactoryConstructor()
{
- final double[] expected = {0.1, 0.2, 0.3, 0.1, 0.3 };
+ final double[] expected = {0.1, 0.2, 0.3, 0.1, 0.3};
checkSamples(AliasMethodDiscreteSampler.of(RandomSource.SPLIT_MIX_64.create(),
expected), expected);
}
@@ -143,7 +143,7 @@ class AliasMethodDiscreteSamplerTest {
*/
@Test
void testNonUniformSamplesWithObservations() {
- final double[] expected = {1, 2, 3, 1, 3 };
+ final double[] expected = {1, 2, 3, 1, 3};
checkSamples(expected);
}
@@ -153,7 +153,7 @@ class AliasMethodDiscreteSamplerTest {
*/
@Test
void testNonUniformSamplesWithProbabilitiesPaddedToPowerOf2() {
- final double[] expected = {0.1, 0, 0.2, 0.3, 0.1, 0.3, 0, 0 };
+ final double[] expected = {0.1, 0, 0.2, 0.3, 0.1, 0.3, 0, 0};
checkSamples(expected);
}
@@ -163,7 +163,7 @@ class AliasMethodDiscreteSamplerTest {
*/
@Test
void testNonUniformSamplesWithObservationsPaddedToPowerOf2() {
- final double[] expected = {1, 2, 3, 0, 1, 3, 0, 0 };
+ final double[] expected = {1, 2, 3, 0, 1, 3, 0, 0};
checkSamples(expected);
}
@@ -173,7 +173,7 @@ class AliasMethodDiscreteSamplerTest {
*/
@Test
void testNonUniformSamplesWithZeroProbabilities() {
- final double[] expected = {0.1, 0, 0.2, 0.3, 0.1, 0.3, 0 };
+ final double[] expected = {0.1, 0, 0.2, 0.3, 0.1, 0.3, 0};
checkSamples(expected);
}
@@ -183,7 +183,7 @@ class AliasMethodDiscreteSamplerTest {
*/
@Test
void testNonUniformSamplesWithZeroObservations() {
- final double[] expected = {1, 2, 3, 0, 1, 3, 0 };
+ final double[] expected = {1, 2, 3, 0, 1, 3, 0};
checkSamples(expected);
}
@@ -193,7 +193,7 @@ class AliasMethodDiscreteSamplerTest {
*/
@Test
void testUniformSamplesWithNoObservationLessThanTheMean() {
- final double[] expected = {2, 2, 2, 2, 2, 2 };
+ final double[] expected = {2, 2, 2, 2, 2, 2};
checkSamples(expected);
}
@@ -202,7 +202,7 @@ class AliasMethodDiscreteSamplerTest {
*/
@Test
void testLargeTableSize() {
- double[] expected = {0.1, 0.2, 0.3, 0.1, 0.3 };
+ double[] expected = {0.1, 0.2, 0.3, 0.1, 0.3};
// Pad to a large table size not supported for fast sampling (anything
> 2^11)
expected = Arrays.copyOf(expected, 1 << 12);
checkSamples(expected);