Class GammaDistr

java.lang.Object
org.apache.commons.math3.distribution.AbstractRealDistribution
org.apache.commons.math3.distribution.GammaDistribution
org.cloudbus.cloudsim.distributions.GammaDistr
All Implemented Interfaces:
java.io.Serializable, org.apache.commons.math3.distribution.RealDistribution, ContinuousDistribution

public class GammaDistr
extends org.apache.commons.math3.distribution.GammaDistribution
implements ContinuousDistribution
A Pseudo-Random Number Generator following the Gamma distribution.
Since:
CloudSim Toolkit 1.0
Author:
Marcos Dias de Assuncao, Manoel Campos da Silva Filho
See Also:
Serialized Form
  • Field Summary

    Fields inherited from class org.apache.commons.math3.distribution.GammaDistribution

    DEFAULT_INVERSE_ABSOLUTE_ACCURACY

    Fields inherited from class org.apache.commons.math3.distribution.AbstractRealDistribution

    random, randomData, SOLVER_DEFAULT_ABSOLUTE_ACCURACY

    Fields inherited from interface org.cloudbus.cloudsim.distributions.ContinuousDistribution

    NULL
  • Constructor Summary

    Constructors 
    Constructor Description
    GammaDistr​(int shape, double scale)
    Creates a Gamma Pseudo-Random Number Generator (RNG) using the current time as seed.
    GammaDistr​(int shape, double scale, long seed)
    Creates a Gamma Pseudo-Random Number Generator (RNG).
    GammaDistr​(int shape, double scale, long seed, org.apache.commons.math3.random.RandomGenerator rng)
    Creates a Gamma Pseudo-Random Number Generator (RNG).
  • Method Summary

    Modifier and Type Method Description
    long getSeed()
    Gets the seed used to initialize the generator
    void reseedRandomGenerator​(long seed)  

    Methods inherited from class org.apache.commons.math3.distribution.GammaDistribution

    cumulativeProbability, density, getAlpha, getBeta, getNumericalMean, getNumericalVariance, getScale, getShape, getSolverAbsoluteAccuracy, getSupportLowerBound, getSupportUpperBound, isSupportConnected, isSupportLowerBoundInclusive, isSupportUpperBoundInclusive, logDensity, sample

    Methods inherited from class org.apache.commons.math3.distribution.AbstractRealDistribution

    cumulativeProbability, inverseCumulativeProbability, probability, probability, sample

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface org.cloudbus.cloudsim.distributions.ContinuousDistribution

    sample
  • Constructor Details

    • GammaDistr

      public GammaDistr​(int shape, double scale)
      Creates a Gamma Pseudo-Random Number Generator (RNG) using the current time as seed.

      Internally, it relies on the JDKRandomGenerator, a wrapper for the Random class that doesn't have high-quality randomness properties but is very fast.

      Parameters:
      shape - the shape parameter of this distribution
      scale - the scale parameter of this distribution
      See Also:
      GammaDistr(int, double, long, RandomGenerator)
    • GammaDistr

      public GammaDistr​(int shape, double scale, long seed)
      Creates a Gamma Pseudo-Random Number Generator (RNG).

      Internally, it relies on the JDKRandomGenerator, a wrapper for the Random class that doesn't have high-quality randomness properties but is very fast.

      Parameters:
      shape - the shape parameter of this distribution
      scale - the scale parameter of this distribution
      seed - the seed
      See Also:
      GammaDistr(int, double, long, RandomGenerator)
    • GammaDistr

      public GammaDistr​(int shape, double scale, long seed, org.apache.commons.math3.random.RandomGenerator rng)
      Creates a Gamma Pseudo-Random Number Generator (RNG).
      Parameters:
      shape - the shape parameter of this distribution
      scale - the scale parameter of this distribution
      seed - the seed already used to initialize the Pseudo-Random Number Generator
      rng - the actual Pseudo-Random Number Generator that will be the base to generate random numbers following a continuous distribution.
  • Method Details

    • getSeed

      public long getSeed()
      Description copied from interface: ContinuousDistribution
      Gets the seed used to initialize the generator
      Specified by:
      getSeed in interface ContinuousDistribution
      Returns:
    • reseedRandomGenerator

      public void reseedRandomGenerator​(long seed)
      Specified by:
      reseedRandomGenerator in interface org.apache.commons.math3.distribution.RealDistribution
      Overrides:
      reseedRandomGenerator in class org.apache.commons.math3.distribution.AbstractRealDistribution