java.lang.Object
dev.nm.stat.random.rng.univariate.poisson.Knuth1969
All Implemented Interfaces:
RandomNumberGenerator, Seedable

public class Knuth1969 extends Object implements RandomNumberGenerator
This is a random number generator that generates random deviates according to the Poisson distribution.
See Also:
  • Constructor Summary

    Constructors
    Constructor
    Description
    Knuth1969(double lambda)
    Constructs a random number generator to sample from the Poisson distribution.
    Knuth1969(double lambda, RandomLongGenerator uniform)
    Constructs a random number generator to sample from the Poisson distribution.
  • Method Summary

    Modifier and Type
    Method
    Description
    double
    Get the next random double.
    void
    seed(long... seeds)
    Seed the random number/vector/scenario generator to produce repeatable experiments.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • Knuth1969

      public Knuth1969(double lambda, RandomLongGenerator uniform)
      Constructs a random number generator to sample from the Poisson distribution.
      Parameters:
      lambda - the shape parameter
      uniform - a uniform random number generator
    • Knuth1969

      public Knuth1969(double lambda)
      Constructs a random number generator to sample from the Poisson distribution.
      Parameters:
      lambda - the shape parameter
  • Method Details

    • 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
    • nextDouble

      public double nextDouble()
      Description copied from interface: RandomNumberGenerator
      Get the next random double.
      Specified by:
      nextDouble in interface RandomNumberGenerator
      Returns:
      the next random number