aherbert opened a new pull request #59: RNG-95: Update the 
DiscreteUniformSampler using faster algorithms.
URL: https://github.com/apache/commons-rng/pull/59
 
 
   Algorithms are added for ranges that are a power of 2 and non-power of 2.
   
   Now specifically handles a lower bound of 0.
   
   The algorithm for a non-power of two precomputes a rejection threshold then 
avoids the modulus operator during sampling. This can significantly increase 
speed when the rejection rate is expected to be high.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to