Class MersenneTwisterParamSearcher


  • public class MersenneTwisterParamSearcher
    extends Object
    Searches for Mersenne-Twister parameters.
    • Field Detail

      • DEFAULT_MERSENNE_EXPONENT

        public static final MersenneExponent DEFAULT_MERSENNE_EXPONENT
    • Constructor Detail

      • MersenneTwisterParamSearcher

        public MersenneTwisterParamSearcher​(RandomLongGenerator rng)
        Constructs a new instance which uses the given RNG to do the parameter search. DEFAULT_MERSENNE_EXPONENT is used.
        Parameters:
        rng - the random number generator to use for the search
      • MersenneTwisterParamSearcher

        public MersenneTwisterParamSearcher​(RandomLongGenerator rng,
                                            MersenneExponent p)
        Constructs a new instance which uses the given RNG to do the parameter search, with the given period parameter.

        The actual period of the RNG will be 2^p, where p is the given period parameter.

        Note that choosing a greater period rapidly increases the cost of running the algorithm and the smallest period should suffice for all but the most demanding application.

        Parameters:
        rng - the random number generator to use for the search
        p - the period parameter