Hi. 2019-10-22 17:04 UTC+02:00, Alex Herbert <alex.d.herb...@gmail.com>: > > On 22/10/2019 15:30, er...@apache.org wrote: >> This is an automated email from the ASF dual-hosted git repository. >> >> erans pushed a commit to branch master >> in repository https://gitbox.apache.org/repos/asf/commons-math.git >> >> commit f8c031ee3810721e99534a1c111f567c3ec6ceb7 >> Author: Gilles Sadowski <gil...@harfang.homelinux.org> >> AuthorDate: Tue Oct 22 13:49:45 2019 +0200 >> >> Upgrade to "Commons RNG" (v1.2). >> >> Seed had to be modified in class "KolmogorovSmirnovTest" for a unit >> test to pass. >> --- >> pom.xml >> | 2 +- >> .../org/apache/commons/math4/stat/inference/KolmogorovSmirnovTest.java >> | 2 +- >> 2 files changed, 2 insertions(+), 2 deletions(-) >> >> diff --git a/pom.xml b/pom.xml >> index 13405ff..f161832 100644 >> --- a/pom.xml >> +++ b/pom.xml >> @@ -63,7 +63,7 @@ >> <math.clirr.version>2.8</math.clirr.version> >> <math.mathjax.version>2.7.2</math.mathjax.version> >> >> <math.commons.numbers.version>1.0-SNAPSHOT</math.commons.numbers.version> >> - <math.commons.rng.version>1.1</math.commons.rng.version> >> + <math.commons.rng.version>1.2</math.commons.rng.version> >> >> <commons.site.path>math</commons.site.path> >> >> <commons.scmPubUrl>https://svn.apache.org/repos/infra/websites/production/commons/content/proper/commons-math</commons.scmPubUrl> >> diff --git >> a/src/main/java/org/apache/commons/math4/stat/inference/KolmogorovSmirnovTest.java >> b/src/main/java/org/apache/commons/math4/stat/inference/KolmogorovSmirnovTest.java >> index 153d1d6..e4a5212 100644 >> --- >> a/src/main/java/org/apache/commons/math4/stat/inference/KolmogorovSmirnovTest.java >> +++ >> b/src/main/java/org/apache/commons/math4/stat/inference/KolmogorovSmirnovTest.java >> @@ -1084,7 +1084,7 @@ public class KolmogorovSmirnovTest { >> if (hasTies(x, y)) { >> // Add jitter using a fixed seed (so same arguments always >> give same results), >> // low-initialization-overhead generator. >> - final UniformRandomProvider rng = >> RandomSource.create(RandomSource.TWO_CMRES, 7654321); >> + final UniformRandomProvider rng = >> RandomSource.create(RandomSource.TWO_CMRES, 76543217); > > Hi Gilles, > > A minor nit, this is not a > > "low-initialization-overhead generator" > > It has the highest construction cost of all the generators.
You are quite right; this is one place where having a lower overhead makes a lot of sense. > It does have > a minimum seed size but that is not the same thing. Would the test pass > with RandomSource.SPLIT_MIX? The generator does not matter (code calls "nextInt(int max)"). I've changed it. [The game is to make the unit test pass with _some_ seed. As the test uses "extreme" values (a.o. MAX_VALUE), the hope is that the same seed will work for the vast majority of useful cases.] Thanks, Gilles > > Alex > >> >> // It is theoretically possible that jitter does not break >> ties, so repeat >> // until all ties are gone. Bound the loop and throw MIE if >> bound is exceeded. >> > > --------------------------------------------------------------------- > To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org > For additional commands, e-mail: dev-h...@commons.apache.org > > --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org For additional commands, e-mail: dev-h...@commons.apache.org