[
https://issues.apache.org/jira/browse/RNG-16?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16865548#comment-16865548
]
Abhishek Singh Dhadwal edited comment on RNG-16 at 6/18/19 8:19 AM:
--------------------------------------------------------------------
Hello,
I shall be working on the task at hand. Upon discussion with Gilles and Alex
Herbert, following are the details about the plan for implementation of the RNG.
There shall be a base abstract class (AbstractLCG) which shall take inputs of
a,c,m and the seed and return integer values as required.
There shall be a child class (KnuthLewisLCG) which shall extend the
aforementioned class with the values of a, c and m referred from [Numerical
Recipes
|https://en.wikipedia.org/wiki/Linear_congruential_generator#Parameters_in_common_use]
The current questions/queries at hand are :
* Will it pass the test suite?
* Can using modulo 2^32 increase performance (to be tested using JMH)
* Comparison between KnuthLewisDirect and the aforementioned child class
The github repository where I will be working currently is :
[https://github.com/AbhishekSinghDhadwal/commons-rng]
The test values (hexadecimal) obtained as per numerical recipes ( for seed = 0)
are as follows :
0
3c6ef35f
47502932
d1ccf6e9
aaf95334
6252e503
9f2ec686
57fe6c2d
a3d95fa8
81fdbee7
94f0af1a
The generator should match these values.
was (Author: abhi1507):
Hello,
I shall be working on the task at hand. Upon discussion with Gilles and Alex
Herbert, following are the details about the plan for implementation of the RNG.
There shall be a base abstract class (AbstractLCG) which shall take inputs of
a,c,m and the seed and return integer values as required.
There shall be a child class (KnuthLewisLCG) which shall extend the
aforementioned class with the values of a, c and m referred from [Numerical
Recipes
|https://en.wikipedia.org/wiki/Linear_congruential_generator#Parameters_in_common_use]
The current questions/queries at hand are :
* Will it pass the test suite?
* Can using modulo 2^32 increase performance (to be tested using JMH)
* Comparison between KnuthLewisDirect and the aforementioned child class
> Linear congruential generators
> ------------------------------
>
> Key: RNG-16
> URL: https://issues.apache.org/jira/browse/RNG-16
> Project: Commons RNG
> Issue Type: Sub-task
> Reporter: Emmanuel Bourg
> Priority: Minor
> Labels: gsoc2019
>
> This is a RFE for implementing linear congruential generators:
> https://en.wikipedia.org/wiki/Linear_congruential_generator
> This type of random generator is often used in language runtimes (Borland C,
> GCC, Delphi, VB and even Java). Preconfigured generators using the same
> parameters as these languages would be convenient for reproducing the same
> number sequences in Java.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)