You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Math-Random is really messy and need to be cleaned :
Some classes are subclasses of Random class
some other classes are PMNumberGenerator, some other from PMRandomGenerator.
What is the difference between PMNumberGenerator and PMRandomGenerator ?
why some classes end with Generator other with RandomGenerator, others by Kernel ?
PMMarsagliaKissRandomKernelis a subclass of Object and there is another class with almost the same name: PMMarsagliaKissRandom. Maybe is their relationship ?
PMLaplaceGenerator subclasses Object instead of PMRandomGenerator ...
@SergeStinckwich With reference to point 3 (What is the difference between PMNumberGenerator and PMRandomGenerator ?) The PMNumberGenerator is dependent upon PMRandomGenerator. Every subclass has a defaultGeneratorClass class method who default is a subclass of PMRandomGenerator (Parker-Miller's algorithm). I think the class PMRandomGenerator should be called PMPseudoRandomNumberGenerators, maybe. I will try and read up a little on the subject before renaming, though.
On point 5, the class comment and Wikipedia say that PMMarsagliaKissRandom is a PRNG. On the relationship question, PMMarsagliaKissRandom depends on/uses the kernel.
So far, having reviewed the production code in Math-Random, the Mersenne Twister class's nextInteger message is quite long, a little difficult to understand. As a start we could try to extract some of the blocks to intention-revealing methods. I've found the original paper on the Mersenne Twister algorithm so this could be used for inspiration.
The scope of the issue is potentially very large. I propose we break this up into smaller ones. I'll review the code again and create issues accordingly.
Activity
Ongoing work on #105. Remove Math-RandomDistributionBased package and…
hemalvarambhia commentedon May 31, 2019
@SergeStinckwich With reference to point 3 (What is the difference between
PMNumberGeneratorandPMRandomGenerator?) ThePMNumberGeneratoris dependent uponPMRandomGenerator. Every subclass has adefaultGeneratorClassclass method who default is a subclass ofPMRandomGenerator(Parker-Miller's algorithm). I think the classPMRandomGeneratorshould be calledPMPseudoRandomNumberGenerators, maybe. I will try and read up a little on the subject before renaming, though.hemalvarambhia commentedon May 31, 2019
On point 5, the class comment and Wikipedia say that
PMMarsagliaKissRandomis a PRNG. On the relationship question,PMMarsagliaKissRandomdepends on/uses the kernel.hemalvarambhia commentedon Jun 19, 2019
So far, having reviewed the production code in Math-Random, the Mersenne Twister class's
nextIntegermessage is quite long, a little difficult to understand. As a start we could try to extract some of the blocks to intention-revealing methods. I've found the original paper on the Mersenne Twister algorithm so this could be used for inspiration.hemalvarambhia commentedon Jun 24, 2019
The scope of the issue is potentially very large. I propose we break this up into smaller ones. I'll review the code again and create issues accordingly.
Merge dev commits to master for the 1.0 release (#145)