commons-rng.git
8 hours agoUse final master
Alex Herbert [Mon, 26 Sep 2022 15:21:10 +0000 (16:21 +0100)] 
Use final

8 hours agoUse better examples for the user guide
Alex Herbert [Mon, 26 Sep 2022 15:15:48 +0000 (16:15 +0100)] 
Use better examples for the user guide

Remove use of generators that fail TestU01 BigCrush and/or PractRand.

Use ZigguratSampler.NormalizedGaussian.

Update CollectionSampler example.

10 hours agoUse better RNGs for the user examples
aherbert [Mon, 26 Sep 2022 13:09:44 +0000 (14:09 +0100)] 
Use better RNGs for the user examples

Replace Mersenne-Twister (MT) with a more robust xor-based generator
XO_RO_SHI_RO_128_PP

10 hours agoUpdate sampling site page
aherbert [Mon, 26 Sep 2022 12:59:20 +0000 (13:59 +0100)] 
Update sampling site page

Remove deprecated API from UnitSphereSampler example.

Use diamond operator.

10 hours agoJavadoc
aherbert [Mon, 26 Sep 2022 12:24:47 +0000 (13:24 +0100)] 
Javadoc

10 hours agoFormatting
aherbert [Mon, 26 Sep 2022 12:23:35 +0000 (13:23 +0100)] 
Formatting

10 hours agoRename ObjectFactory to SeededObjectFactory
aherbert [Mon, 26 Sep 2022 12:23:17 +0000 (13:23 +0100)] 
Rename ObjectFactory to SeededObjectFactory

The name captures the fact that the object is created using a seed
source.

11 hours agoAdd japicmp configuration to reporting section
aherbert [Mon, 26 Sep 2022 12:15:27 +0000 (13:15 +0100)] 
Add japicmp configuration to reporting section

11 hours agoAdd missing @since tags
aherbert [Mon, 26 Sep 2022 12:09:49 +0000 (13:09 +0100)] 
Add missing @since tags

11 hours agoRemove xdoc processing instruction with reserved name
aherbert [Mon, 26 Sep 2022 12:09:44 +0000 (13:09 +0100)] 
Remove xdoc processing instruction with reserved name

2 days agoCorrect line number for checkstyle suppression
Alex Herbert [Sat, 24 Sep 2022 13:48:25 +0000 (14:48 +0100)] 
Correct line number for checkstyle suppression

2 days agoSimplify boolean expression
Alex Herbert [Sat, 24 Sep 2022 13:45:00 +0000 (14:45 +0100)] 
Simplify boolean expression

2 days agoUpdate checkstyle config using latest example
Alex Herbert [Sat, 24 Sep 2022 13:42:10 +0000 (14:42 +0100)] 
Update checkstyle config using latest example

Updated from:
https://github.com/checkstyle/checkstyle/blob/master/src/main/resources/sun_checks.xml

2 days agoUpdate revapi plugin
Alex Herbert [Sat, 24 Sep 2022 13:26:31 +0000 (14:26 +0100)] 
Update revapi plugin

maven plugin 0.14.6 -> 0.14.7
java version 0.26.1 -> 0.27.0

2 days agoDrop checkstyle 3.1.2 for 3.2.0 in commons parent
Alex Herbert [Sat, 24 Sep 2022 13:20:01 +0000 (14:20 +0100)] 
Drop checkstyle 3.1.2 for 3.2.0 in commons parent

Update checkstyle dependency 8.45 for 9.3 in commons parent

2 days agoDrop junit 5.7.2 for 5.9.0 in commons parent
Alex Herbert [Sat, 24 Sep 2022 13:03:33 +0000 (14:03 +0100)] 
Drop junit 5.7.2 for 5.9.0 in commons parent

2 days agoDrop surefire 3.0.0-M5 for 3.0.0-M7 in commons parent
Alex Herbert [Sat, 24 Sep 2022 13:01:10 +0000 (14:01 +0100)] 
Drop surefire 3.0.0-M5 for 3.0.0-M7 in commons parent

2 days agoDrop antrun 1.8 for 3.1.0 in commons parent
Alex Herbert [Sat, 24 Sep 2022 12:59:46 +0000 (13:59 +0100)] 
Drop antrun 1.8 for 3.1.0 in commons parent

3 days agospotbugs: Allow floating-point loop control in sampling example
Alex Herbert [Fri, 23 Sep 2022 22:39:23 +0000 (23:39 +0100)] 
spotbugs: Allow floating-point loop control in sampling example

3 days agoUpdate to commons-parent 54
Alex Herbert [Fri, 23 Sep 2022 21:52:06 +0000 (22:52 +0100)] 
Update to commons-parent 54

Remove javadoc links. The links configured in CP create redirect
warnings on JDK 17 which fail the build. JDK links are automatically
added by the javadoc plugin based on the target version.

Suppress spotbugs errors from intentional use of floating-point loop
counters.

Disable CycloneDX as config is incorrect for multi-module builds.

5 days agoSonar fix: Isolate possible source of runtime exception
Alex Herbert [Wed, 21 Sep 2022 18:37:39 +0000 (19:37 +0100)] 
Sonar fix: Isolate possible source of runtime exception

5 days agoSonar fix: Ensure shift is performed on a long
Alex Herbert [Wed, 21 Sep 2022 18:29:55 +0000 (19:29 +0100)] 
Sonar fix: Ensure shift is performed on a long

7 days agoExplicit factory method name
Alex Herbert [Mon, 19 Sep 2022 20:02:28 +0000 (21:02 +0100)] 
Explicit factory method name

Reuse of the method with the annotation @MethodSource(value =
{"testSamplesFrequencies"}) led to a JUnit runtime error on JDK 17 with
commons-parent 54.

7 days agoAdd splittable documentation to user guide
Alex Herbert [Mon, 19 Sep 2022 19:10:29 +0000 (20:10 +0100)] 
Add splittable documentation to user guide

7 days agoRNG-181: Track changes
Alex Herbert [Mon, 19 Sep 2022 19:05:47 +0000 (20:05 +0100)] 
RNG-181: Track changes

11 days agoRNG-181: LXM family to support SplittableUniformRandomProvider
Alex Herbert [Wed, 7 Sep 2022 12:08:56 +0000 (13:08 +0100)] 
RNG-181: LXM family to support SplittableUniformRandomProvider

Create generic RandomStreams class that can stream objects created with
a seed and splittable source of randomness. The seed uses the stream
position mixed with random bits to ensure it is unique within the stream
(up to a size limit of 2^60). Use this feature to support splits in the
LXM family.

Add isSplittable method to RandomSource to use to identify supported
interfaces.

Use of the splittable interface by other modules requires an exception
in RevAPI for exposing an external class in the API. This is similar to
exposure of UniformRandomProvider and is allowed. The change is
non-breaking for binary and source compatibility (see revapi
java.class.externalClassExposedInAPI).

3 weeks agoUpdate sub-module README to use the default Maven goal
aherbert [Mon, 5 Sep 2022 12:28:07 +0000 (13:28 +0100)] 
Update sub-module README to use the default Maven goal

3 weeks agoRNG-180: Add a SplittableUniformRandomProvider interface
Alex Herbert [Mon, 5 Sep 2022 12:23:21 +0000 (13:23 +0100)] 
RNG-180: Add a SplittableUniformRandomProvider interface

Provide default implementations for spliterators to support parallel
streams for the interface stream methods. This includes the parent
UniformRandomProvider interface methods for primitive streams.

Refactor stream tests for UniformRandomProvider to allow the same tests
to be used on SplittableUniformRandomProvider.

4 weeks agoUpdate README to use the default Maven goal
Gary Gregory [Fri, 26 Aug 2022 12:27:26 +0000 (08:27 -0400)] 
Update README to use the default Maven goal

7 weeks agoAllow javadoc warnings in the JMH module
Alex Herbert [Fri, 5 Aug 2022 19:39:56 +0000 (20:39 +0100)] 
Allow javadoc warnings in the JMH module

Enables building on JDK 17

7 weeks agoFix some typo and grammar.
Arturo Bernal [Fri, 5 Aug 2022 17:17:10 +0000 (19:17 +0200)] 
Fix some typo and grammar.

2 months agoMigrate workflows from adopt to temurin
Alex Herbert [Wed, 29 Jun 2022 22:26:16 +0000 (23:26 +0100)] 
Migrate workflows from adopt to temurin

2 months agoUse GitHub Actions setup-java Maven cache property
Alex Herbert [Wed, 29 Jun 2022 12:58:29 +0000 (13:58 +0100)] 
Use GitHub Actions setup-java Maven cache property

3 months agoRequire method javadoc for private scope
Alex Herbert [Sun, 26 Jun 2022 21:41:27 +0000 (22:41 +0100)] 
Require method javadoc for private scope

3 months agoAdd missing javadoc checks
Alex Herbert [Sat, 25 Jun 2022 09:39:40 +0000 (10:39 +0100)] 
Add missing javadoc checks

3 months agoFail javadoc on warnings
Alex Herbert [Sat, 25 Jun 2022 09:01:43 +0000 (10:01 +0100)] 
Fail javadoc on warnings

3 months agoIncrease jacoco method ratio to 1.00
Alex Herbert [Sat, 25 Jun 2022 08:48:18 +0000 (09:48 +0100)] 
Increase jacoco method ratio to 1.00

3 months agoFail build on coverage checks
Alex Herbert [Sat, 25 Jun 2022 08:46:18 +0000 (09:46 +0100)] 
Fail build on coverage checks

3 months agoRemove empty revapi configuration section
Alex Herbert [Fri, 10 Jun 2022 14:20:29 +0000 (15:20 +0100)] 
Remove empty revapi configuration section

3 months agoRemove block level element from inside <p> tags
Alex Herbert [Thu, 9 Jun 2022 15:29:03 +0000 (16:29 +0100)] 
Remove block level element from inside <p> tags

3 months agoUpdate JMH 1.32 to 1.35
Alex Herbert [Thu, 9 Jun 2022 08:45:31 +0000 (09:45 +0100)] 
Update JMH 1.32 to 1.35

3 months agoDisable Travis CI
Alex Herbert [Thu, 9 Jun 2022 08:16:47 +0000 (09:16 +0100)] 
Disable Travis CI

Remove Travis profile

3 months agoUpdate README badges
Alex Herbert [Thu, 9 Jun 2022 08:16:25 +0000 (09:16 +0100)] 
Update README badges

coveralls to codecov
travis to GH actions

3 months agoRNG-179: Track changes
Alex Herbert [Thu, 9 Jun 2022 08:11:06 +0000 (09:11 +0100)] 
RNG-179: Track changes

3 months agoRNG-179: Add fast loaded dice roller discrete sampler 112/head
aherbert [Mon, 23 May 2022 12:18:45 +0000 (13:18 +0100)] 
RNG-179: Add fast loaded dice roller discrete sampler

3 months agoCorrect if-else GH action workflow
Alex Herbert [Sat, 4 Jun 2022 08:41:28 +0000 (09:41 +0100)] 
Correct if-else GH action workflow

3 months agoUse a single build goal
Alex Herbert [Sat, 4 Jun 2022 08:11:05 +0000 (09:11 +0100)] 
Use a single build goal

This allows the examples modules to use the dependency artifacts from
the build and not the local repository.

3 months agoUse greater than expression in GH workflow
Alex Herbert [Sun, 29 May 2022 21:08:06 +0000 (22:08 +0100)] 
Use greater than expression in GH workflow

3 months agoSkip spotbugs in JMH module
Alex Herbert [Sun, 29 May 2022 07:27:00 +0000 (08:27 +0100)] 
Skip spotbugs in JMH module

3 months agoSkip generated files in JMH module
Alex Herbert [Sun, 29 May 2022 07:26:16 +0000 (08:26 +0100)] 
Skip generated files in JMH module

3 months agoRun examples on JDK 17
Alex Herbert [Sun, 29 May 2022 06:40:11 +0000 (07:40 +0100)] 
Run examples on JDK 17

3 months agoAdd module javadoc
Alex Herbert [Sun, 29 May 2022 06:38:59 +0000 (07:38 +0100)] 
Add module javadoc

4 months agoFix working directory
Alex Herbert [Fri, 27 May 2022 15:25:39 +0000 (16:25 +0100)] 
Fix working directory

4 months agoSimplify GH build workflow
Alex Herbert [Fri, 27 May 2022 15:24:50 +0000 (16:24 +0100)] 
Simplify GH build workflow

4 months agoVerify the examples in the GH action workflow
Alex Herbert [Thu, 26 May 2022 23:01:37 +0000 (00:01 +0100)] 
Verify the examples in the GH action workflow

4 months agoIgnore IntBuffer in animal sniffer
Alex Herbert [Thu, 26 May 2022 23:00:54 +0000 (00:00 +0100)] 
Ignore IntBuffer in animal sniffer

JDK9 breaks compatibility with older versions for IntBuffer.flip() by
returning IntBuffer instead of Buffer.

This ignores this change to allow building on JDK 9+.

4 months agoUpdate GH actions versions
Alex Herbert [Thu, 26 May 2022 22:22:14 +0000 (23:22 +0100)] 
Update GH actions versions

4 months agoSimplify returns. 113/head
Arturo Bernal [Thu, 26 May 2022 19:02:29 +0000 (21:02 +0200)] 
Simplify returns.

4 months agoParameter name typo
aherbert [Mon, 23 May 2022 15:21:03 +0000 (16:21 +0100)] 
Parameter name typo

4 months agoMethod name typo
aherbert [Mon, 23 May 2022 12:29:06 +0000 (13:29 +0100)] 
Method name typo

4 months agoFormatting
aherbert [Mon, 23 May 2022 12:21:24 +0000 (13:21 +0100)] 
Formatting

4 months agoChanges typo
Alex Herbert [Thu, 19 May 2022 08:15:59 +0000 (09:15 +0100)] 
Changes typo

4 months agoRNG-178: Add stream support to JumpableUniformRandomProvider
Alex Herbert [Tue, 17 May 2022 12:10:31 +0000 (13:10 +0100)] 
RNG-178: Add stream support to JumpableUniformRandomProvider

4 months agoJavadoc
Alex Herbert [Tue, 17 May 2022 10:07:13 +0000 (11:07 +0100)] 
Javadoc

4 months agoRNG-176: Track changes
Alex Herbert [Mon, 16 May 2022 20:47:24 +0000 (21:47 +0100)] 
RNG-176: Track changes

4 months agoRNG-176: Update user guide with new UniformRandomProvider methods
Alex Herbert [Mon, 16 May 2022 20:44:06 +0000 (21:44 +0100)] 
RNG-176: Update user guide with new UniformRandomProvider methods

4 months agoRNG-176: Remove redundant methods from core module 111/head
aherbert [Fri, 13 May 2022 10:40:46 +0000 (11:40 +0100)] 
RNG-176: Remove redundant methods from core module

The methods are now present as default implementations in the client-api
UniformRandomProvider.

This requires JApiCmp is disabled as it does not recognise the change as
compatible. Binary compatibility is checked by revapi which allows this
change.

4 months agoRNG-176: Update anonymous implementations of UniformRandomProvider
aherbert [Tue, 10 May 2022 15:42:30 +0000 (16:42 +0100)] 
RNG-176: Update anonymous implementations of UniformRandomProvider

Only one method is required to implement the interface. This simplifies
creation of implementations for testing edge cases.

For a delegate implementation then additional methods must be added.
This applies to RandomSource.unrestorable.

4 months agoRNG-176: Enhance the UniformRandomProvider interface
aherbert [Fri, 29 Apr 2022 10:08:44 +0000 (11:08 +0100)] 
RNG-176: Enhance the UniformRandomProvider interface

Add methods for streams and generation of numbers in a range. The
methods match those implementations in JDK 17 RandomGenerator interface.

Add default implementations of the existing interface methods using
nextLong() as the source of randomness.

4 months agoAdd explicit dependency from simple to the client-api module
aherbert [Fri, 13 May 2022 14:42:55 +0000 (15:42 +0100)] 
Add explicit dependency from simple to the client-api module

The simple module uses interfaces from the client-api that can be after
v1.0. Add an explicit dependency to avoid transitive dependency
resolution creating mismatched modules.

4 months agoAdd revapi plugin for binary compatibility check
aherbert [Fri, 13 May 2022 14:07:42 +0000 (15:07 +0100)] 
Add revapi plugin for binary compatibility check

4 months agoDo not leak package-private class in public API
aherbert [Mon, 9 May 2022 12:55:12 +0000 (13:55 +0100)] 
Do not leak package-private class in public API

Reduces the 'protected' copy method to 'package-private'.

This issue was detected using the revapi maven plugin.

4 months agoRemove public test modifier
aherbert [Wed, 4 May 2022 15:44:01 +0000 (16:44 +0100)] 
Remove public test modifier

4 months agoSonar fix: lambdas to have 1 invocation possible throwing an exception
aherbert [Wed, 4 May 2022 15:41:44 +0000 (16:41 +0100)] 
Sonar fix: lambdas to have 1 invocation possible throwing an exception

4 months agoSonar fix: Use @ParameterizedTest
aherbert [Wed, 4 May 2022 15:21:39 +0000 (16:21 +0100)] 
Sonar fix: Use @ParameterizedTest

4 months agoRNG-177: Track changes
aherbert [Wed, 4 May 2022 14:11:19 +0000 (15:11 +0100)] 
RNG-177: Track changes

4 months agoRNG-177: Add streaming examples to the user guide
aherbert [Wed, 4 May 2022 14:09:34 +0000 (15:09 +0100)] 
RNG-177: Add streaming examples to the user guide

4 months agoRNG-177: Add stream methods to the sampler API 110/head
aherbert [Wed, 4 May 2022 12:25:35 +0000 (13:25 +0100)] 
RNG-177: Add stream methods to the sampler API

5 months agoSet permissions for GH Actions
aherbert [Wed, 27 Apr 2022 14:29:24 +0000 (15:29 +0100)] 
Set permissions for GH Actions

5 months agoRNG-168: Track changes 109/head
Alex Herbert [Sun, 17 Apr 2022 13:24:49 +0000 (14:24 +0100)] 
RNG-168: Track changes

5 months agoRNG-168: Add stress test results
aherbert [Tue, 12 Apr 2022 09:40:23 +0000 (10:40 +0100)] 
RNG-168: Add stress test results

5 months agoRNG-168: LXM family of random number generators
Alex Herbert [Wed, 9 Mar 2022 00:23:36 +0000 (00:23 +0000)] 
RNG-168: LXM family of random number generators

Add support for generators included in JDK 17:

L32X64Mix
L64X128StarStar
L64X128Mix
L64X256Mix
L64X1024Mix
L128X128Mix
L128X256Mix
L128X1024Mix

Added benchmark for support routines for computing the unsigned long
multiplications in the 128-bit LCG (linear congruential generator).

Added a benchmark for the jump function to allow comparison with the
equivalent base XBG (xor-based generator).

Added a faster carry computation than the method provided in the
reference LXM paper.

5 months agoUse the copy constructor
aherbert [Tue, 12 Apr 2022 11:58:15 +0000 (12:58 +0100)] 
Use the copy constructor

5 months agoSpotbugs excludes for updated spotbugs version
aherbert [Tue, 12 Apr 2022 11:41:01 +0000 (12:41 +0100)] 
Spotbugs excludes for updated spotbugs version

5 months agoDrop <h3> package titles
aherbert [Tue, 12 Apr 2022 11:22:34 +0000 (12:22 +0100)] 
Drop <h3> package titles

This allows building on JDK 17

5 months agoUpdate to commons parent 53
aherbert [Tue, 12 Apr 2022 11:09:28 +0000 (12:09 +0100)] 
Update to commons parent 53

Update changes support for spotbugs with updated propertie names. It now
supports JDK 17.

5 months agoDo not put lists within paragraph blocks
aherbert [Tue, 12 Apr 2022 10:51:23 +0000 (11:51 +0100)] 
Do not put lists within paragraph blocks

5 months agoUpdate developer guide
aherbert [Tue, 12 Apr 2022 10:48:09 +0000 (11:48 +0100)] 
Update developer guide

Drop reference to building with ant.

Add notes about contributing using GitHub PRs.

5 months agoAdd table of contents to user guide
aherbert [Tue, 12 Apr 2022 10:32:37 +0000 (11:32 +0100)] 
Add table of contents to user guide

The user guide page can be directly linked from the site menu.

Added selected section links to the site menu.

5 months agoAdd GH actions for CI build and coverage
aherbert [Tue, 12 Apr 2022 09:31:37 +0000 (10:31 +0100)] 
Add GH actions for CI build and coverage

5 months agoAdd @since tags
Alex Herbert [Thu, 7 Apr 2022 20:25:18 +0000 (21:25 +0100)] 
Add @since tags

5 months agoUse reference instead of lambda.
Arturo Bernal [Thu, 7 Apr 2022 18:43:35 +0000 (20:43 +0200)] 
Use reference instead of lambda.

5 months agoDo not use fully qualified classname in javadoc
Alex Herbert [Thu, 7 Apr 2022 19:54:34 +0000 (20:54 +0100)] 
Do not use fully qualified classname in javadoc

5 months agofix broken javadoc link. 107/head
Arturo Bernal [Thu, 7 Apr 2022 18:41:41 +0000 (20:41 +0200)] 
fix broken javadoc link.

5 months agoRNG-174: Improve support for non-zero seeds
aherbert [Fri, 1 Apr 2022 16:46:12 +0000 (17:46 +0100)] 
RNG-174: Improve support for non-zero seeds

Allow specification of a range for array seeds that must be non-zero.

The values for the range are based on the result of
o.a.c.rng.simple.ProvidersCommonParametricTest.testZeroIntArraySeed.

See also the core module for tests using:
- RandomAssert.assertNextIntZeroOutput
- RandomAssert.assertIntArrayConstructorWithSingleBitInPoolIsFunctional

Any generator that fails these tests requires a non-zero seed. In most
cases this was set as the full seed length, or one less for generators
that do not use all the bits of the seed array (WELL_19937_x,
WELL_44497_x).

Notable exceptions:

The KISS generator is reduced to a simple LCG when positions [0, 3) are
all zero. Added a test to demonstrate this. With a zero seed the KISS
LCG passes testZeroIntArraySeed. To avoid a poor generator the seed will
be checked to be non-zero in [0, 3).

The MSWS generator is sensitive to the initial state. Added a test to
show that a zero seed creates zero output. Updating RandomAssert to add
an assertLongArrayConstructorWithSingleBitInPoolIsFunctional test shows
the MSWS fails with single bit seeds. The sub-range has been set to [2,
3) to ensure a non-zero Weyl increment which is the best way to escape a
bad seed. This is a functionally breaking change.

5 months agoFix typo
aherbert [Tue, 5 Apr 2022 12:26:23 +0000 (13:26 +0100)] 
Fix typo

5 months agoRNG-175: Fix MSWS createSeed(UniformRandomProvider) to handle a bad RNG
aherbert [Tue, 5 Apr 2022 12:26:04 +0000 (13:26 +0100)] 
RNG-175: Fix MSWS createSeed(UniformRandomProvider) to handle a bad RNG

The createSeed(UniformRandomProvider) method should generate a seed even
if the input RNG is non-functional. This fixes an infinite loop when the
RNG output is not suitably random to create a seed.

5 months agoRemove unused import
aherbert [Wed, 30 Mar 2022 12:09:45 +0000 (13:09 +0100)] 
Remove unused import

5 months agoSupport methods can be static
aherbert [Wed, 30 Mar 2022 11:40:01 +0000 (12:40 +0100)] 
Support methods can be static

5 months agoUpdate checkNextInRange to use a LongSupplier
aherbert [Wed, 30 Mar 2022 11:39:18 +0000 (12:39 +0100)] 
Update checkNextInRange to use a LongSupplier

The generic type <T extends Number> was used as a long value. The type
can be dropped to avoid auto-boxing for all generator tests.

Modified methods to static.