Class BoxMuller

  • All Implemented Interfaces:
    RandomStandardNormalGenerator, RandomNumberGenerator, Seedable

    public class BoxMuller
    extends Object
    implements RandomStandardNormalGenerator
    The Box-Muller transform (by George Edward Pelham Box and Mervin Edgar Muller 1958) is a pseudo-random number sampling method for generating pairs of independent standard normally distributed (zero expectation, unit variance) random numbers, given a source of uniformly distributed random numbers.
    See Also:
    • Wikipedia: Box-Muller transform
    • "G. E. P. Box, and M. E. Muller, "A note on the generation of random normal deviates," Annals of Mathematical Statistics 29:610-611, 1958."
    • Constructor Detail

      • BoxMuller

        public BoxMuller​(RandomLongGenerator uniform)
        Construct a random number generator to sample from the standard Normal distribution.
        Parameters:
        uniform - a uniform random number generator
      • BoxMuller

        public BoxMuller()
        Construct a random number generator to sample from the standard Normal distribution.
    • Method Detail

      • seed

        public void seed​(long... seeds)
        Description copied from interface: Seedable
        Seed the random number/vector/scenario generator to produce repeatable experiments.
        Specified by:
        seed in interface Seedable
        Parameters:
        seeds - the seeds