Class CompositeLinearCongruentialGenerator

java.lang.Object
dev.nm.stat.random.rng.univariate.uniform.linear.CompositeLinearCongruentialGenerator
All Implemented Interfaces:
RandomLongGenerator, RandomNumberGenerator, LinearCongruentialGenerator, Seedable

public class CompositeLinearCongruentialGenerator extends Object implements LinearCongruentialGenerator
A composite generator combines a number of simple LinearCongruentialGenerator, such as Lehmer, to form one longer period generator by first summing values and then taking modulus. The resultant generator in general has a superior uniformity and a longer period, without overflowing the arithmetics.
  • Constructor Details

    • CompositeLinearCongruentialGenerator

      public CompositeLinearCongruentialGenerator(LinearCongruentialGenerator[] rng)
      Constructs a linear congruential generator from some simpler and shorter modulus generators.
      Parameters:
      rng - simpler and shorter modulus linear congruential generators
  • Method Details