Skip to content

v2.0.0

Latest
Compare
Choose a tag to compare
@jenetics jenetics released this 11 Nov 18:48
· 8 commits to master since this release
v2.0.0
7a37ee8

Improvements

Make the random engines compatible with the RandomGenerator API of Java 17.

All random generators can be created with new or via the RandomGenerator.of("<name>") or RandomGeneratorFactory.of("<name>") factory method.

final LCG64ShiftRandom random1 = new LCG64ShiftRandom();
final RandomGenerator random2 = RandomGenerator.of("LCG64ShiftRandom");
final RandomGenerator random3 = RandomGeneratorFactory.of("LCG64ShiftRandom").create();

The following PRNGs are implemented:

  • KISS32Random: Implementation of an simple PRNG as proposed in Good Practice in (Pseudo) Random Number Generation for Bioinformatics Applications (JKISS32, page 3) David Jones, UCL Bioinformatics Group.
  • KISS64Random: Implementation of an simple PRNG as proposed in Good Practice in (Pseudo) Random Number Generation for Bioinformatics Applications (JKISS64, page 10) David Jones, UCL Bioinformatics Group.
  • LCG64ShiftRandom: This class implements a linear congruential PRNG with additional bit-shift transition. It is a port of the trng::lcg64_shift PRNG class of the TRNG library created by Heiko Bauke.
  • MT19937_32Random: This is a 32-bit version of Mersenne Twister pseudorandom number generator.
  • MT19937_64Random: This is a 64-bit version of Mersenne Twister pseudorandom number generator.
  • XOR32ShiftRandom: This generator was discovered and characterized by George Marsaglia [Xorshift RNGs]. In just three XORs and three shifts (generally fast operations) it produces a full period of 232 - 1 on 32 bits. (The missing value is zero, which perpetuates itself and must be avoided.) High and low bits pass Diehard.
  • XOR64ShiftRandom: This generator was discovered and characterized by George Marsaglia [Xorshift RNGs]. In just three XORs and three shifts (generally fast operations) it produces a full period of 264 - 1 on 64 bits. (The missing value is zero, which perpetuates itself and must be avoided.) High and low bits pass Diehard.