[ 
https://issues.apache.org/jira/browse/RNG-89?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18074873#comment-18074873
 ] 

Alex Herbert commented on RNG-89:
---------------------------------

There is no requirement for a reimplementation of the SplittableRandom 
generator. Since the UniformRandomProvider interface is now a 
FunctionalInterface then this can be achieved using:
{code:java}
UniformRandomProvider rng = new SplittableRandom().split()::nextLong;
{code}

The only value this change would provide is the choice of the increment for the 
Weyl sequence as the split to generate the increment is random. However 
choosing a good increment is problematic as some can reduce the quality of the 
generator output. In addition, mix based generators using a single long are 
limited to a period of 2^64. This is of limited use for modern Monte Carlo 
methods that may far exceed this period length when run multiple times in 
parallel. It is expected that this type of generator would have little use in 
practice over other generators in the library.

> Configurable SplitMix generator
> -------------------------------
>
>                 Key: RNG-89
>                 URL: https://issues.apache.org/jira/browse/RNG-89
>             Project: Commons RNG
>          Issue Type: New Feature
>          Components: core
>    Affects Versions: 1.3
>            Reporter: Alex Herbert
>            Assignee: Alex Herbert
>            Priority: Minor
>
> The {{SplitMix64}} algorithm is based on a [Weyl 
> sequence|[https://en.wikipedia.org/wiki/Weyl_sequence]]. The increment for 
> the sequence is denoted K.
> The current implementation uses a fixed increment for the Weyl sequence based 
> on the Golden ratio ((sqrt(5)-1) / 2). However any odd number in the range [0 
> - 2^64] can be used to ensure a full period. 
> The JDK SplittableRandom exploits this fact in the split() method which 
> creates a new generator that has a different increment for the Weyl sequence. 
> The javadoc states that the two outputs are very unlikely to overlap and have 
> the same statistical properties.
> Note that the SplittableRandom adds a further condition that the bit sequence 
> of the increment K is a random mix of 0s and 1s. If the number of transitions 
> between 0 and 1 or vice versa is too low then the number of transitions is 
> increased. This ensures the state of the Weyl sequence is updated across all 
> the bits at each iteration.
> Create a new SplitMix64K implementation that uses an additional {{long}} to 
> seed the increment for the Weyl sequence and test if this viable.
> Such a generator would expand the usefulness of the vary fast SplitMix64 
> generator as the low likelihood of sequence overlap would make it applicable 
> for use in parallel computations.
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to