Class KunduGupta2007

java.lang.Object
dev.nm.stat.random.rng.univariate.gamma.KunduGupta2007
All Implemented Interfaces:
RandomGammaGenerator, RandomNumberGenerator, Seedable

public class KunduGupta2007 extends Object implements RandomGammaGenerator
Kundu-Gupta propose a very convenient way to generate gamma random variables using generalized exponential distribution, when the shape parameter lies between 0 and 1. This implementation is Algorithm 3 in the reference.
  • Constructor Summary

    Constructors
    Constructor
    Description
    KunduGupta2007(double k, double theta)
    Constructs a random number generator to sample from the gamma distribution.
    KunduGupta2007(double k, double theta, RandomLongGenerator uniform)
    Constructs a random number generator to sample from the gamma 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

    • KunduGupta2007

      public KunduGupta2007(double k, double theta, RandomLongGenerator uniform)
      Constructs a random number generator to sample from the gamma distribution.
      Parameters:
      k - the shape parameter
      theta - the scale parameter
      uniform - a uniform random number generator
    • KunduGupta2007

      public KunduGupta2007(double k, double theta)
      Constructs a random number generator to sample from the gamma distribution.
      Parameters:
      k - the shape parameter
      theta - the scale 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