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
Arturo Bernal [Fri, 5 Aug 2022 17:17:10 +0000 (19:17 +0200)]
Fix some typo and grammar.
Alex Herbert [Wed, 29 Jun 2022 22:26:16 +0000 (23:26 +0100)]
Migrate workflows from adopt to temurin
Alex Herbert [Wed, 29 Jun 2022 12:58:29 +0000 (13:58 +0100)]
Use GitHub Actions setup-java Maven cache property
Alex Herbert [Sun, 26 Jun 2022 21:41:27 +0000 (22:41 +0100)]
Require method javadoc for private scope
Alex Herbert [Sat, 25 Jun 2022 09:39:40 +0000 (10:39 +0100)]
Add missing javadoc checks
Alex Herbert [Sat, 25 Jun 2022 09:01:43 +0000 (10:01 +0100)]
Fail javadoc on warnings
Alex Herbert [Sat, 25 Jun 2022 08:48:18 +0000 (09:48 +0100)]
Increase jacoco method ratio to 1.00
Alex Herbert [Sat, 25 Jun 2022 08:46:18 +0000 (09:46 +0100)]
Fail build on coverage checks
Alex Herbert [Fri, 10 Jun 2022 14:20:29 +0000 (15:20 +0100)]
Remove empty revapi configuration section
Alex Herbert [Thu, 9 Jun 2022 15:29:03 +0000 (16:29 +0100)]
Remove block level element from inside <p> tags
Alex Herbert [Thu, 9 Jun 2022 08:45:31 +0000 (09:45 +0100)]
Update JMH 1.32 to 1.35
Alex Herbert [Thu, 9 Jun 2022 08:16:47 +0000 (09:16 +0100)]
Disable Travis CI
Remove Travis profile
Alex Herbert [Thu, 9 Jun 2022 08:16:25 +0000 (09:16 +0100)]
Update README badges
coveralls to codecov
travis to GH actions
Alex Herbert [Thu, 9 Jun 2022 08:11:06 +0000 (09:11 +0100)]
RNG-179: Track changes
aherbert [Mon, 23 May 2022 12:18:45 +0000 (13:18 +0100)]
RNG-179: Add fast loaded dice roller discrete sampler
Alex Herbert [Sat, 4 Jun 2022 08:41:28 +0000 (09:41 +0100)]
Correct if-else GH action workflow
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.
Alex Herbert [Sun, 29 May 2022 21:08:06 +0000 (22:08 +0100)]
Use greater than expression in GH workflow
Alex Herbert [Sun, 29 May 2022 07:27:00 +0000 (08:27 +0100)]
Skip spotbugs in JMH module
Alex Herbert [Sun, 29 May 2022 07:26:16 +0000 (08:26 +0100)]
Skip generated files in JMH module
Alex Herbert [Sun, 29 May 2022 06:40:11 +0000 (07:40 +0100)]
Run examples on JDK 17
Alex Herbert [Sun, 29 May 2022 06:38:59 +0000 (07:38 +0100)]
Add module javadoc
Alex Herbert [Fri, 27 May 2022 15:25:39 +0000 (16:25 +0100)]
Fix working directory
Alex Herbert [Fri, 27 May 2022 15:24:50 +0000 (16:24 +0100)]
Simplify GH build workflow
Alex Herbert [Thu, 26 May 2022 23:01:37 +0000 (00:01 +0100)]
Verify the examples in the GH action workflow
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+.
Alex Herbert [Thu, 26 May 2022 22:22:14 +0000 (23:22 +0100)]
Update GH actions versions
Arturo Bernal [Thu, 26 May 2022 19:02:29 +0000 (21:02 +0200)]
Simplify returns.
aherbert [Mon, 23 May 2022 15:21:03 +0000 (16:21 +0100)]
Parameter name typo
aherbert [Mon, 23 May 2022 12:29:06 +0000 (13:29 +0100)]
Method name typo
aherbert [Mon, 23 May 2022 12:21:24 +0000 (13:21 +0100)]
Formatting
Alex Herbert [Thu, 19 May 2022 08:15:59 +0000 (09:15 +0100)]
Changes typo
Alex Herbert [Tue, 17 May 2022 12:10:31 +0000 (13:10 +0100)]
RNG-178: Add stream support to JumpableUniformRandomProvider
Alex Herbert [Tue, 17 May 2022 10:07:13 +0000 (11:07 +0100)]
Javadoc
Alex Herbert [Mon, 16 May 2022 20:47:24 +0000 (21:47 +0100)]
RNG-176: Track changes
Alex Herbert [Mon, 16 May 2022 20:44:06 +0000 (21:44 +0100)]
RNG-176: Update user guide with new UniformRandomProvider methods
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.
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.
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.
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.
aherbert [Fri, 13 May 2022 14:07:42 +0000 (15:07 +0100)]
Add revapi plugin for binary compatibility check
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.
aherbert [Wed, 4 May 2022 15:44:01 +0000 (16:44 +0100)]
Remove public test modifier
aherbert [Wed, 4 May 2022 15:41:44 +0000 (16:41 +0100)]
Sonar fix: lambdas to have 1 invocation possible throwing an exception
aherbert [Wed, 4 May 2022 15:21:39 +0000 (16:21 +0100)]
Sonar fix: Use @ParameterizedTest
aherbert [Wed, 4 May 2022 14:11:19 +0000 (15:11 +0100)]
RNG-177: Track changes
aherbert [Wed, 4 May 2022 14:09:34 +0000 (15:09 +0100)]
RNG-177: Add streaming examples to the user guide
aherbert [Wed, 4 May 2022 12:25:35 +0000 (13:25 +0100)]
RNG-177: Add stream methods to the sampler API
aherbert [Wed, 27 Apr 2022 14:29:24 +0000 (15:29 +0100)]
Set permissions for GH Actions
Alex Herbert [Sun, 17 Apr 2022 13:24:49 +0000 (14:24 +0100)]
RNG-168: Track changes
aherbert [Tue, 12 Apr 2022 09:40:23 +0000 (10:40 +0100)]
RNG-168: Add stress test results
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.
aherbert [Tue, 12 Apr 2022 11:58:15 +0000 (12:58 +0100)]
Use the copy constructor
aherbert [Tue, 12 Apr 2022 11:41:01 +0000 (12:41 +0100)]
Spotbugs excludes for updated spotbugs version
aherbert [Tue, 12 Apr 2022 11:22:34 +0000 (12:22 +0100)]
Drop <h3> package titles
This allows building on JDK 17
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.
aherbert [Tue, 12 Apr 2022 10:51:23 +0000 (11:51 +0100)]
Do not put lists within paragraph blocks
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.
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.
aherbert [Tue, 12 Apr 2022 09:31:37 +0000 (10:31 +0100)]
Add GH actions for CI build and coverage
Alex Herbert [Thu, 7 Apr 2022 20:25:18 +0000 (21:25 +0100)]
Add @since tags
Arturo Bernal [Thu, 7 Apr 2022 18:43:35 +0000 (20:43 +0200)]
Use reference instead of lambda.
Alex Herbert [Thu, 7 Apr 2022 19:54:34 +0000 (20:54 +0100)]
Do not use fully qualified classname in javadoc
Arturo Bernal [Thu, 7 Apr 2022 18:41:41 +0000 (20:41 +0200)]
fix broken javadoc link.
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.
aherbert [Tue, 5 Apr 2022 12:26:23 +0000 (13:26 +0100)]
Fix typo
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.
aherbert [Wed, 30 Mar 2022 12:09:45 +0000 (13:09 +0100)]
Remove unused import
aherbert [Wed, 30 Mar 2022 11:40:01 +0000 (12:40 +0100)]
Support methods can be static
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.
aherbert [Wed, 30 Mar 2022 11:26:24 +0000 (12:26 +0100)]
Correct isUniformNextByte test
Chi-square critical value should be for 255 degrees of freedom.
This lowers the critical value from 311.56 to 310.46. The test is now
harder to pass.
aherbert [Wed, 30 Mar 2022 11:06:45 +0000 (12:06 +0100)]
Consistent error messages for nextInRange test
Port modifications from sampling ContinuousSamplerParametricTest to the
ProvidersCommonParametricTest in core and simple modules.
Updated the precision of the chi-square critical value.
Add failed chi-square values to the message.
Format failed chi-square values to 3 decimal places.
aherbert [Wed, 30 Mar 2022 10:10:37 +0000 (11:10 +0100)]
Consolidate Int/LongProvider to use next() as the source of random bits
This removes the mixed use of next and nextLong or nextInt. The next
method is default source of the random bits and should always be used.
Alex Herbert [Mon, 28 Mar 2022 20:09:01 +0000 (21:09 +0100)]
RNG-173: BaseProvider static method to extend an input array seed
aherbert [Tue, 29 Mar 2022 12:40:26 +0000 (13:40 +0100)]
Correct longAsInt output in the stress test application
RNG-171 changed the cached int source to output a long as two ints using
the low 32-bits, then high 32-bits.
Updated the RngDataOutput to support HiLo or LoHi. Added tests for each
implementation.
Dropped high-bits and low-bits command options. Added source64 option
with enum for high, low, high-Low, low-high, long, int. The default for
stress testing matches the caching implementation.
Update the test documentation to reflect the changes.
aherbert [Mon, 28 Mar 2022 14:01:15 +0000 (15:01 +0100)]
RNG-169: Avoid long to int[] that can generate a zero output seed.
This is relevant to small state RNGs with an int[] native seed such as
XoRoShiRo64StarStar.
aherbert [Wed, 23 Mar 2022 15:40:07 +0000 (15:40 +0000)]
Add missing <p> tags
Alex Herbert [Sun, 20 Mar 2022 21:45:31 +0000 (21:45 +0000)]
Fix trailing whitespace
Alex Herbert [Sun, 20 Mar 2022 21:36:01 +0000 (21:36 +0000)]
Document the lack of functional compatibility for derived output types.
Only the reference output type (int/long) from the generator is required
to maintain functional compatibility.
Alex Herbert [Sun, 20 Mar 2022 20:51:36 +0000 (20:51 +0000)]
RNG-171: Reduce the memory footprint in cached boolean and int source
This change has a performance improvement on some JDKs.
Add a benchmark to compare the performance with and without the cache.
Alex Herbert [Fri, 18 Mar 2022 16:25:45 +0000 (16:25 +0000)]
RNG-172: Support power of 2 by lowering limit by 1
This change has been made for completeness. In practice a different
sampler is used for powers of 2.
aherbert [Fri, 18 Mar 2022 14:46:48 +0000 (14:46 +0000)]
RNG-172: Pre-compute rejection threshold
Alex Herbert [Thu, 17 Mar 2022 22:36:29 +0000 (22:36 +0000)]
Use Java 1.8 method to compute map value if absent
Alex Herbert [Thu, 17 Mar 2022 22:19:05 +0000 (22:19 +0000)]
RNG-169: Track changes
Alex Herbert [Thu, 17 Mar 2022 22:08:55 +0000 (22:08 +0000)]
RNG-169: Remove redundant Seed2ArrayConverter implementation
The functionality has been moved to the Conversions class. This removes
unreleased public API methods from legacy convertor classes.
Add tests to ensure coverage for converter classes.
Alex Herbert [Thu, 17 Mar 2022 21:57:19 +0000 (21:57 +0000)]
Fix PMD errors
Alex Herbert [Thu, 17 Mar 2022 21:54:45 +0000 (21:54 +0000)]
RNG-169: Move array size conversions to Conversions class
Alex Herbert [Thu, 17 Mar 2022 21:48:56 +0000 (21:48 +0000)]
RNG-169: Move all conversions to the Conversions class
Remove use of instances of SeedConverter as the conversion is stateless.
Alex Herbert [Thu, 17 Mar 2022 09:26:14 +0000 (09:26 +0000)]
RNG-169: Expand primitive input seeds using a SplitMix64
This changes behaviour so that
if int == long:
int -> array1
long -> array2
array1 == array2
int -> array[0] == int -> long
Alex Herbert [Thu, 17 Mar 2022 09:21:54 +0000 (09:21 +0000)]
RNG-169: Avoid intermediate arrays during conversions
The following conversions now avoid intermediate arrays:
byte[] -> int
byte[] -> long
int[] -> long
Behaviour change:
int[] is now converted as if to long[] then to long. This avoids loss of
bits and changes the possible output seeds from 2^32 to 2^64.
aherbert [Wed, 16 Mar 2022 14:39:06 +0000 (14:39 +0000)]
RNG-169: Update array seed conversion to use optimum seed length
Avoid duplication of the input byte[] to zero fill it to a length
modulus 4 or 8 for conversion by the NumberFactory.
During array to array conversions only convert the minimum of the
required number of bytes for the native seed type, or the number of
input bytes.
Change all array conversions to use little-endian byte order.
Alex Herbert [Wed, 16 Mar 2022 00:06:47 +0000 (00:06 +0000)]
RNG-170: Ensure nextBytes is consistent with JDK range checks
Updated to match behaviour of System.arraycopy and JDK 9
Objects.checkFromIndexSize. This now allows:
nextBytes(new byte[0], 0, 0)
nextBytes(new byte[10], 10, 0)
Previously these would throw an exception.
aherbert [Tue, 15 Mar 2022 16:06:10 +0000 (16:06 +0000)]
Return the class type of the unrecognised seed.
This avoids creating a message containing the string representation of
an Object. This may be a very large String, for example a BitSet.
fix
aherbert [Tue, 15 Mar 2022 15:12:23 +0000 (15:12 +0000)]
Update NumberFactory to use parameterized/repeated tests
Add little-endian test for byte[] conversions.
Check all the test long/int values in nextBoolean.
aherbert [Thu, 10 Mar 2022 13:12:24 +0000 (13:12 +0000)]
Documentation typos
aherbert [Thu, 10 Mar 2022 11:10:30 +0000 (11:10 +0000)]
Add option to list a range of the RandomSource enum
aherbert [Thu, 10 Mar 2022 10:20:57 +0000 (10:20 +0000)]
Add missing generator name to example command
aherbert [Wed, 2 Mar 2022 13:41:27 +0000 (13:41 +0000)]
Add TSampler to continuous sampler performance JMH example
aherbert [Wed, 2 Mar 2022 13:26:34 +0000 (13:26 +0000)]
Add example histogram of the TSampler output to the userguide.