commons-rng.git
11 months agoUpdate examples app version to 1.5-SNAPSHOT
aherbert [Mon, 13 Sep 2021 10:33:19 +0000 (11:33 +0100)] 
Update examples app version to 1.5-SNAPSHOT

11 months agoUpdate release and BC version in parent pom
aherbert [Mon, 13 Sep 2021 10:32:04 +0000 (11:32 +0100)] 
Update release and BC version in parent pom

11 months agoUpdate README to refer to 1.4 release
aherbert [Mon, 13 Sep 2021 10:31:03 +0000 (11:31 +0100)] 
Update README to refer to 1.4 release

11 months agoUpdate pom to next development version (1.4 to 1.5)
aherbert [Mon, 13 Sep 2021 10:27:51 +0000 (11:27 +0100)] 
Update pom to next development version (1.4 to 1.5)

11 months agoRetrieve 1.4 release details from the release branch
aherbert [Mon, 13 Sep 2021 10:20:43 +0000 (11:20 +0100)] 
Retrieve 1.4 release details from the release branch

11 months agoUpdate javadoc.
aherbert [Tue, 7 Sep 2021 11:39:11 +0000 (12:39 +0100)] 
Update javadoc.

Correct description of new RandomSource.create(...) method where the
enum defines the concrete implementation, not the first argument to
create.

Move description of parallel applications to a sub-section. Add
description of parallel support from the jumpable generators with a code
example.

11 months agoPlace @since tags after @see tags following Oracle's order convension
aherbert [Mon, 6 Sep 2021 11:19:46 +0000 (12:19 +0100)] 
Place @since tags after @see tags following Oracle's order convension

11 months agoAdd @since tags to new RandomSource.create methods
aherbert [Mon, 6 Sep 2021 11:01:54 +0000 (12:01 +0100)] 
Add @since tags to new RandomSource.create methods

11 months agoDo not perform minimal site checkout in pre-site phase
Alex Herbert [Sun, 5 Sep 2021 13:50:08 +0000 (14:50 +0100)] 
Do not perform minimal site checkout in pre-site phase

This profile must now be explicitly activated.

11 months agoExclude site-content.README from rat check
Alex Herbert [Sun, 5 Sep 2021 13:34:55 +0000 (14:34 +0100)] 
Exclude site-content.README from rat check

Use the same excludes in the build and reporting section

11 months agoFix changes typo
Alex Herbert [Sun, 5 Sep 2021 13:32:40 +0000 (14:32 +0100)] 
Fix changes typo

11 months agoUpdate user guide dependencies to require Java 1.8
Alex Herbert [Sun, 5 Sep 2021 13:31:21 +0000 (14:31 +0100)] 
Update user guide dependencies to require Java 1.8

11 months agoFormat ziggurat tables
aherbert [Wed, 1 Sep 2021 15:33:27 +0000 (16:33 +0100)] 
Format ziggurat tables

The byte[] MAP is now initialized using (byte) casting.

11 months agoAdd ziggurat versions with multiple max epsilon values
aherbert [Tue, 31 Aug 2021 16:44:23 +0000 (17:44 +0100)] 
Add ziggurat versions with multiple max epsilon values

Correct exponential epsilon values to use the ceiling of the float value
before rounding to a long integer.

11 months agoUpdate grammar for conscious language checker
Alex Herbert [Sun, 29 Aug 2021 18:13:00 +0000 (19:13 +0100)] 
Update grammar for conscious language checker

11 months agoUpdate grammar for conscious language checker
Alex Herbert [Sun, 29 Aug 2021 18:05:25 +0000 (19:05 +0100)] 
Update grammar for conscious language checker

11 months agoUpdate grammar for conscious language checker
Alex Herbert [Sun, 29 Aug 2021 18:01:58 +0000 (19:01 +0100)] 
Update grammar for conscious language checker

11 months agoAdd more platform results for exp(z)
Alex Herbert [Sat, 28 Aug 2021 09:46:04 +0000 (10:46 +0100)] 
Add more platform results for exp(z)

11 months agoFix trailing spaces
Alex Herbert [Sat, 28 Aug 2021 09:16:17 +0000 (10:16 +0100)] 
Fix trailing spaces

11 months agoAdd performance test for exp(x) with x in [-8, 0]
Alex Herbert [Sat, 28 Aug 2021 09:13:04 +0000 (10:13 +0100)] 
Add performance test for exp(x) with x in [-8, 0]

11 months agoDisable tests in JMH module.
Alex Herbert [Fri, 27 Aug 2021 14:46:59 +0000 (15:46 +0100)] 
Disable tests in JMH module.

Add a better fixed seed with a note on how to test samplers using a
random seed.

11 months agoAdd performance test for extracting the sign bit
Alex Herbert [Fri, 27 Aug 2021 13:49:58 +0000 (14:49 +0100)] 
Add performance test for extracting the sign bit

Update tests requiring a fast generator to use a LCG. Only applicable
when the upper bits are required.

11 months agoRemove branch frequencies from performance variations
Alex Herbert [Fri, 27 Aug 2021 13:27:04 +0000 (14:27 +0100)] 
Remove branch frequencies from performance variations

The branch frequencies are the same as the main sampler. This eliminates
duplication and eases maintenance.

11 months agoParameterise the ziggurat sampler test
Alex Herbert [Fri, 27 Aug 2021 13:17:48 +0000 (14:17 +0100)] 
Parameterise the ziggurat sampler test

Duplicate the test in the JMH module. This ensures all variations
correctly sample the distribution, i.e. changes do not introduce errors
in the algorithm.

This identified an error in ModifiedZigguratExponentialSamplerRecursion.

11 months agoUpdate ziggurat performance benchmark to match main code
Alex Herbert [Fri, 27 Aug 2021 11:49:20 +0000 (12:49 +0100)] 
Update ziggurat performance benchmark to match main code

Naming conventions and comments have been updated to match those in the
main sampling package. This is for ease of maintenance.

11 months agoComment typo
Alex Herbert [Fri, 27 Aug 2021 11:47:15 +0000 (12:47 +0100)] 
Comment typo

11 months agoChange another mask operation to a bit shift.
aherbert [Thu, 26 Aug 2021 17:05:34 +0000 (18:05 +0100)] 
Change another mask operation to a bit shift.

11 months agoUpdate ziggurat sampler using result of the performance tests
aherbert [Thu, 26 Aug 2021 17:05:04 +0000 (18:05 +0100)] 
Update ziggurat sampler using result of the performance tests

Use a single method to interpolate x and y. This avoids a subtraction in
the interpolation of y.

Avoid recursion in the exponential sampler.

Use shifts to generate unsigned longs. This favours the upper bits of
the uniform deviate.

Each change is either mute or may have a marginal benefit depending on
the platform. Together the sampler should be consistently performant
across JDKs and platforms.

Update tests that manipulate the output from the exponential sampler:
stable sampler test
ziggurat sampler test

11 months agoDisable interpolation test method
aherbert [Thu, 26 Aug 2021 14:47:37 +0000 (15:47 +0100)] 
Disable interpolation test method

11 months agoUpdate ziggurat test to target regions of the ziggurat.
aherbert [Thu, 26 Aug 2021 14:22:33 +0000 (15:22 +0100)] 
Update ziggurat test to target regions of the ziggurat.

This targets concave, inflection, and convex overhangs and the tail of
the Gaussian.

This targets concave overhangs, and the tail of the exponential.

Note: This test is still not able to identify minor errors in the sampling algorithm. The test cannot detect the difference between a concave region sampled correctly or sampled using a uniform sample from the lower-left triangle.

11 months agoPMD: Allow long class for ZigguratSampler
Alex Herbert [Wed, 25 Aug 2021 22:35:11 +0000 (23:35 +0100)] 
PMD: Allow long class for ZigguratSampler

11 months agoUpdate ziggurat performance benchmark with more methods
Alex Herbert [Wed, 25 Aug 2021 20:02:41 +0000 (21:02 +0100)] 
Update ziggurat performance benchmark with more methods

Use only bit shifts for random positive longs.

Use a different method to sample y.

Benchmark methods to interpolate X or Y

11 months agoUpdate observed frequencies with expected where appropriate.
aherbert [Wed, 25 Aug 2021 15:53:44 +0000 (16:53 +0100)] 
Update observed frequencies with expected where appropriate.

The expected frequencies are obtained during the table construction.
They closely match the previously measured observed frequencies.

11 months agoAdd description of sampling method to the ziggurat sampler.
aherbert [Wed, 25 Aug 2021 15:36:32 +0000 (16:36 +0100)] 
Add description of sampling method to the ziggurat sampler.

Update the javadoc for all values and methods to be consistent with the
summary description.

11 months agoEnsure same samplers are tested in single and sequential
Alex Herbert [Wed, 25 Aug 2021 08:40:28 +0000 (09:40 +0100)] 
Ensure same samplers are tested in single and sequential

Use a base class to define the samplers.

11 months agoBenchmark using a long to get an index, compare it, and return the index
aherbert [Tue, 24 Aug 2021 17:13:00 +0000 (18:13 +0100)] 
Benchmark using a long to get an index, compare it, and return the index

11 months agoAdd ziggurat exponential sampler with no recursion to the benchmark
aherbert [Tue, 24 Aug 2021 16:42:55 +0000 (17:42 +0100)] 
Add ziggurat exponential sampler with no recursion to the benchmark

11 months agoUpdate ZigguaratSampler branch frequencies
aherbert [Tue, 24 Aug 2021 15:14:23 +0000 (16:14 +0100)] 
Update ZigguaratSampler branch frequencies

11 months agoUpdate ZigguaratSampler point of inflection for the Gaussian.
aherbert [Tue, 24 Aug 2021 13:36:26 +0000 (14:36 +0100)] 
Update ZigguaratSampler point of inflection for the Gaussian.

The point of inflection is the largest x value below 1. When x=1 the
second derivative of the Gaussian is zero (i.e. the point of
inflection).

11 months agoUpdate ZigguaratSampler concave epsilon for the exponential.
aherbert [Tue, 24 Aug 2021 12:57:17 +0000 (13:57 +0100)] 
Update ZigguaratSampler concave epsilon for the exponential.

This should be equal to approximately 9.2%. The previous value was
approximately 5.6% resulting in fast acceptance too often for overhangs.

11 months agoRNG-163: Track changes
aherbert [Tue, 24 Aug 2021 09:28:10 +0000 (10:28 +0100)] 
RNG-163: Track changes

11 months agoUpdate release howto
Alex Herbert [Thu, 19 Aug 2021 12:33:44 +0000 (13:33 +0100)] 
Update release howto

Change testing mvn command to 'verify' in place of 'package' to ensure
checks are run.

Separate site generation from the release build of the binary artifacts.

11 months agoRemove examples from the release profile.
Alex Herbert [Thu, 19 Aug 2021 08:40:59 +0000 (09:40 +0100)] 
Remove examples from the release profile.

11 months agoRemove legacy assembly directory.
Alex Herbert [Thu, 19 Aug 2021 08:38:29 +0000 (09:38 +0100)] 
Remove legacy assembly directory.

Functionality is in the dist-archive module.

11 months agoRename LICENCE and NOTICE files
Alex Herbert [Thu, 19 Aug 2021 08:37:00 +0000 (09:37 +0100)] 
Rename LICENCE and NOTICE files

Drop the .txt suffix to use the preferred name in the ASF release
guidelines.

11 months agoRemove examples from the binary distribution
Alex Herbert [Thu, 19 Aug 2021 08:18:30 +0000 (09:18 +0100)] 
Remove examples from the binary distribution

11 months agoRemove redundant fileSet
Alex Herbert [Thu, 19 Aug 2021 08:13:20 +0000 (09:13 +0100)] 
Remove redundant fileSet

Dependencies are packaged due to the dependencies resolution from the
dependencySet

12 months agoUpdate plugin order in pom
Alex Herbert [Wed, 18 Aug 2021 23:38:10 +0000 (00:38 +0100)] 
Update plugin order in pom

Use a consistent order with commons-math:

checkstyle
spotbugs
pmd

12 months agoClarify purpose of module in the description
Alex Herbert [Wed, 18 Aug 2021 15:51:10 +0000 (16:51 +0100)] 
Clarify purpose of module in the description

12 months agoRemove docs archive from the binary distribution.
Alex Herbert [Wed, 18 Aug 2021 15:45:38 +0000 (16:45 +0100)] 
Remove docs archive from the binary distribution.

This javadoc directory duplicates the javadoc jars within the binary
release archive.

12 months agoCreate aggregate javadoc report in docs module
Alex Herbert [Tue, 17 Aug 2021 21:42:06 +0000 (22:42 +0100)] 
Create aggregate javadoc report in docs module

12 months agoRemove checksum from installed artifacts
Alex Herbert [Tue, 17 Aug 2021 21:11:33 +0000 (22:11 +0100)] 
Remove checksum from installed artifacts

This creates md5 and sha1 checksums for the dist-archive pom in the
local maven repository. It is not required.

12 months agoRemove unused wildcard
Alex Herbert [Tue, 17 Aug 2021 20:50:04 +0000 (21:50 +0100)] 
Remove unused wildcard

12 months agoExclude site-content generated file from archive
Alex Herbert [Tue, 17 Aug 2021 20:44:31 +0000 (21:44 +0100)] 
Exclude site-content generated file from archive

12 months agoCorrect the help comment
Alex Herbert [Tue, 17 Aug 2021 09:57:29 +0000 (10:57 +0100)] 
Correct the help comment

12 months agoAdd aggregator module for documentation
Alex Herbert [Tue, 17 Aug 2021 09:53:32 +0000 (10:53 +0100)] 
Add aggregator module for documentation

12 months agoNo diamond operator on anonymous inner class
Alex Herbert [Tue, 17 Aug 2021 08:16:04 +0000 (09:16 +0100)] 
No diamond operator on anonymous inner class

12 months agoRemove duplicate ConstantName module
Alex Herbert [Mon, 16 Aug 2021 23:07:40 +0000 (00:07 +0100)] 
Remove duplicate ConstantName module

12 months agoUse diamond operator
Alex Herbert [Mon, 16 Aug 2021 23:06:40 +0000 (00:06 +0100)] 
Use diamond operator

12 months agoRNG-163: Make tests and test classes package-private 101/head
Alex Herbert [Mon, 16 Aug 2021 22:57:38 +0000 (23:57 +0100)] 
RNG-163: Make tests and test classes package-private

JUnit 5 does not require public fixtures.

12 months agoUse diamond operator
Alex Herbert [Mon, 16 Aug 2021 21:10:12 +0000 (22:10 +0100)] 
Use diamond operator

12 months agoDrop redundant array to Arrays.asList
Alex Herbert [Mon, 16 Aug 2021 21:06:04 +0000 (22:06 +0100)] 
Drop redundant array to Arrays.asList

12 months agoRNG-163: Replace try-catch with assertThrows
Alex Herbert [Sun, 15 Aug 2021 21:37:01 +0000 (22:37 +0100)] 
RNG-163: Replace try-catch with assertThrows

12 months agoRNG-163: Remove JUnit 4 support
Alex Herbert [Sun, 15 Aug 2021 20:46:50 +0000 (21:46 +0100)] 
RNG-163: Remove JUnit 4 support

Drop the junit-vintage-engine dependency.

12 months agoRNG-163: Update JUnit 4 @Test to JUnit 5 @Test
Alex Herbert [Sun, 15 Aug 2021 20:30:13 +0000 (21:30 +0100)] 
RNG-163: Update JUnit 4 @Test to JUnit 5 @Test

Requires changing:

- @BeforeClass to @BeforeAll
- @Rule timeout to Assertions.assertTimeout

12 months agoRNG-163: Update parametric tests to JUnit 5 ParameterizedTest
Alex Herbert [Sun, 15 Aug 2021 20:24:51 +0000 (21:24 +0100)] 
RNG-163: Update parametric tests to JUnit 5 ParameterizedTest

12 months agoRNG-163: Replace expected thrown exception with assertThrows
Alex Herbert [Sun, 15 Aug 2021 15:11:53 +0000 (16:11 +0100)] 
RNG-163: Replace expected thrown exception with assertThrows

Some multiple methods, one per exception, have been merged into a common
method.

12 months agoRNG-163: Replace JUnit 4 Assert with JUnit 5 Assertions
Alex Herbert [Sun, 15 Aug 2021 12:55:25 +0000 (13:55 +0100)] 
RNG-163: Replace JUnit 4 Assert with JUnit 5 Assertions

Tests for float equality with a delta of 0.0 have been updated to remove the delta.

Replace JUnit 4 Assume with JUnit 5 Assumptions

12 months agoRemove Java 8 profiles from modules
Alex Herbert [Sun, 15 Aug 2021 08:22:09 +0000 (09:22 +0100)] 
Remove Java 8 profiles from modules

12 months agoRNG-163: Update pom dependency JUnit 4 to JUnit 5
Alex Herbert [Sun, 15 Aug 2021 08:19:20 +0000 (09:19 +0100)] 
RNG-163: Update pom dependency JUnit 4 to JUnit 5

Inclusion of the junit-vintage-engine allows all existing tests to run.

12 months agoUpdate user guide Gaussian performance table
Alex Herbert [Sun, 15 Aug 2021 07:02:55 +0000 (08:02 +0100)] 
Update user guide Gaussian performance table

This has been repeated following changes to the new ZigguratSampler

12 months agoTrack changes
Alex Herbert [Sat, 14 Aug 2021 06:26:37 +0000 (07:26 +0100)] 
Track changes

12 months agoMerge pull request #98 from arturobernalg/feature/simplify
Alex Herbert [Sat, 14 Aug 2021 06:24:53 +0000 (07:24 +0100)] 
Merge pull request #98 from arturobernalg/feature/simplify

Simplify assertions with equivalent but more simple.

12 months agoSimplify assertions with equivalent but more simple. 98/head
Arturo Bernal [Sat, 14 Aug 2021 05:15:50 +0000 (07:15 +0200)] 
Simplify assertions with equivalent but more simple.

12 months agoRemove comment about a change to use a Supplier
Alex Herbert [Fri, 13 Aug 2021 22:42:18 +0000 (23:42 +0100)] 
Remove comment about a change to use a Supplier

Use of the JDK 8 Supplier function has been implemented.

12 months agoReplace benchmarking interfaces with java.util.function
Alex Herbert [Fri, 13 Aug 2021 19:31:42 +0000 (20:31 +0100)] 
Replace benchmarking interfaces with java.util.function

12 months agoUse lambdas
Alex Herbert [Fri, 13 Aug 2021 19:20:20 +0000 (20:20 +0100)] 
Use lambdas

12 months agoUpdate description of java requirements in the user guide
Alex Herbert [Fri, 13 Aug 2021 18:56:03 +0000 (19:56 +0100)] 
Update description of java requirements in the user guide

12 months agoUpdate examples/release profiles to require java 11
Alex Herbert [Fri, 13 Aug 2021 18:47:05 +0000 (19:47 +0100)] 
Update examples/release profiles to require java 11

12 months agoUpdate minimum java version in chamges log
Alex Herbert [Fri, 13 Aug 2021 18:45:17 +0000 (19:45 +0100)] 
Update minimum java version in chamges log

12 months agoUpdate minimum java version in documentation
Alex Herbert [Fri, 13 Aug 2021 18:44:43 +0000 (19:44 +0100)] 
Update minimum java version in documentation

12 months agoUse java.util.function.DoubleUnaryOperator
Alex Herbert [Fri, 13 Aug 2021 18:40:25 +0000 (19:40 +0100)] 
Use java.util.function.DoubleUnaryOperator

Return lambdas.

12 months agoUse Objects.requireNonNull
Alex Herbert [Fri, 13 Aug 2021 18:34:01 +0000 (19:34 +0100)] 
Use Objects.requireNonNull

12 months agoUse JDK 8 Double.isFinite and Math.nextUp/Down
Alex Herbert [Fri, 13 Aug 2021 18:31:42 +0000 (19:31 +0100)] 
Use JDK 8 Double.isFinite and Math.nextUp/Down

12 months agoDrop clirr plugin. It is superceded by japicmp
Alex Herbert [Fri, 13 Aug 2021 18:11:00 +0000 (19:11 +0100)] 
Drop clirr plugin. It is superceded by japicmp

clirr does support new Java 8 language functions features such as lambda
expressions.

12 months agoMove Java 8 profile plugins to the main pom
Alex Herbert [Fri, 13 Aug 2021 18:08:07 +0000 (19:08 +0100)] 
Move Java 8 profile plugins to the main pom

12 months agoRNG-162: Update Java from 1.7 to 1.8
Alex Herbert [Fri, 13 Aug 2021 18:04:16 +0000 (19:04 +0100)] 
RNG-162: Update Java from 1.7 to 1.8

12 months agoUpdate JDK 9 to 11 in travis
Alex Herbert [Fri, 13 Aug 2021 13:34:03 +0000 (14:34 +0100)] 
Update JDK 9 to 11 in travis

12 months agoDrop JDK 7 build from travis
Alex Herbert [Fri, 13 Aug 2021 13:33:18 +0000 (14:33 +0100)] 
Drop JDK 7 build from travis

This is pending a change of the source to Java 8 ([RNG-162]).

12 months agoClean site-content.README file
Alex Herbert [Fri, 13 Aug 2021 13:04:06 +0000 (14:04 +0100)] 
Clean site-content.README file

12 months agoUpdate the method to make a boolean
Alex Herbert [Fri, 13 Aug 2021 12:59:26 +0000 (13:59 +0100)] 
Update the method to make a boolean

There is no requirement to shift the sign bit as the number can be
directly compared to zero.

12 months agoDelete site checkout in the clean phase
Alex Herbert [Fri, 13 Aug 2021 08:16:27 +0000 (09:16 +0100)] 
Delete site checkout in the clean phase

12 months agoFix site checkout when svn is not available
Alex Herbert [Thu, 12 Aug 2021 22:44:19 +0000 (23:44 +0100)] 
Fix site checkout when svn is not available

12 months agoAdd source download link for examples in user guide
Alex Herbert [Thu, 12 Aug 2021 21:28:57 +0000 (22:28 +0100)] 
Add source download link for examples in user guide

12 months agoCorrect required java versions in user guide
Alex Herbert [Thu, 12 Aug 2021 21:19:43 +0000 (22:19 +0100)] 
Correct required java versions in user guide

12 months agoDelete redundant comment (the task has been implemented)
aherbert [Thu, 12 Aug 2021 16:35:16 +0000 (17:35 +0100)] 
Delete redundant comment (the task has been implemented)

12 months agoRNG-160: Extract ziggurat edge sampling to a separate method
aherbert [Thu, 12 Aug 2021 16:33:07 +0000 (17:33 +0100)] 
RNG-160: Extract ziggurat edge sampling to a separate method

This improves performance.

Use nested branches to match implementation in the JMH module where the
performance was verified.

12 months agoUpdate alias tables in the ziggurat sampler
aherbert [Thu, 12 Aug 2021 16:12:15 +0000 (17:12 +0100)] 
Update alias tables in the ziggurat sampler

12 months agoAdd ziggurat samplers with a table size of 512 to the performance test
aherbert [Thu, 12 Aug 2021 15:02:28 +0000 (16:02 +0100)] 
Add ziggurat samplers with a table size of 512 to the performance test

12 months agoAdd loop variation of the exponential sampler
aherbert [Wed, 11 Aug 2021 12:39:55 +0000 (13:39 +0100)] 
Add loop variation of the exponential sampler