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
-
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 generatorvoid
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
-
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 theRandom
class that doesn't have high-quality randomness properties but is very fast.- Parameters:
shape
- the shape parameter of this distributionscale
- 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 theRandom
class that doesn't have high-quality randomness properties but is very fast.- Parameters:
shape
- the shape parameter of this distributionscale
- the scale parameter of this distributionseed
- 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 distributionscale
- the scale parameter of this distributionseed
- the seed already used to initialize the Pseudo-Random Number Generatorrng
- 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 interfaceContinuousDistribution
- Returns:
-
reseedRandomGenerator
public void reseedRandomGenerator(long seed)- Specified by:
reseedRandomGenerator
in interfaceorg.apache.commons.math3.distribution.RealDistribution
- Overrides:
reseedRandomGenerator
in classorg.apache.commons.math3.distribution.AbstractRealDistribution
-