Class LomaxDistr
java.lang.Object
org.apache.commons.math3.distribution.AbstractRealDistribution
org.apache.commons.math3.distribution.ParetoDistribution
org.cloudbus.cloudsim.distributions.ParetoDistr
org.cloudbus.cloudsim.distributions.LomaxDistr
- All Implemented Interfaces:
Serializable
,org.apache.commons.math3.distribution.RealDistribution
,ContinuousDistribution
,StatisticalDistribution
A Pseudo-Random Number Generator following the
Lomax distribution.
- Since:
- CloudSim Toolkit 1.0
- Author:
- Marcos Dias de Assuncao, Manoel Campos da Silva Filho
- See Also:
-
Field Summary
Fields inherited from class org.apache.commons.math3.distribution.ParetoDistribution
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
ConstructorDescriptionLomaxDistr
(double shape, double location, double shift) Creates a lomax Pseudo-Random Number Generator (PRNG) using the current time as seed.LomaxDistr
(double shape, double location, double shift, long seed) Creates a lomax Pseudo-Random Number Generator (PRNG).LomaxDistr
(double shape, double location, double shift, long seed, org.apache.commons.math3.random.RandomGenerator rng) Creates a lomax Pseudo-Random Number Generator (PRNG). -
Method Summary
Modifier and TypeMethodDescriptionlong
getSeed()
Gets the seed used to initialize the generatorvoid
reseedRandomGenerator
(long seed) double
sample()
Generate a new pseudo random number.Methods inherited from class org.cloudbus.cloudsim.distributions.ParetoDistr
isApplyAntitheticVariates, originalSample, setApplyAntitheticVariates
Methods inherited from class org.apache.commons.math3.distribution.ParetoDistribution
cumulativeProbability, cumulativeProbability, density, getNumericalMean, getNumericalVariance, getScale, getShape, getSolverAbsoluteAccuracy, getSupportLowerBound, getSupportUpperBound, isSupportConnected, isSupportLowerBoundInclusive, isSupportUpperBoundInclusive, logDensity
Methods inherited from class org.apache.commons.math3.distribution.AbstractRealDistribution
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.apache.commons.math3.distribution.RealDistribution
cumulativeProbability, cumulativeProbability, density, getNumericalMean, getNumericalVariance, getSupportLowerBound, getSupportUpperBound, inverseCumulativeProbability, isSupportConnected, isSupportLowerBoundInclusive, isSupportUpperBoundInclusive, probability, sample
Methods inherited from interface org.cloudbus.cloudsim.distributions.StatisticalDistribution
isApplyAntitheticVariates, originalSample, setApplyAntitheticVariates
-
Constructor Details
-
LomaxDistr
public LomaxDistr(double shape, double location, double shift) Creates a lomax Pseudo-Random Number Generator (PRNG) using the current time as seed.- Parameters:
shape
- the shape parameter of this distributionlocation
- the location parameter of this distributionshift
- the shift parameter of this distribution- See Also:
-
LomaxDistr
public LomaxDistr(double shape, double location, double shift, long seed) Creates a lomax Pseudo-Random Number Generator (PRNG).- Parameters:
shape
- the shape parameter of this distributionlocation
- the location parameter of this distributionshift
- the shift parameter of this distributionseed
- the seed- See Also:
-
LomaxDistr
public LomaxDistr(double shape, double location, double shift, long seed, org.apache.commons.math3.random.RandomGenerator rng) Creates a lomax Pseudo-Random Number Generator (PRNG).- Parameters:
shape
- the shape parameter of this distributionlocation
- the location parameter of this distributionshift
- the shift 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
-
sample
public double sample()Description copied from interface:StatisticalDistribution
Generate a new pseudo random number. If theAntithetic Variates Technique
is enabled, the returned value is manipulated to try reducing variance or generated random numbers. Check the provided link for details.- Specified by:
sample
in interfaceContinuousDistribution
- Specified by:
sample
in interfaceorg.apache.commons.math3.distribution.RealDistribution
- Specified by:
sample
in interfaceStatisticalDistribution
- Overrides:
sample
in classorg.apache.commons.math3.distribution.ParetoDistribution
- Returns:
- the next pseudo random number in the sequence, following the implemented distribution.
-
getSeed
public long getSeed()Description copied from interface:StatisticalDistribution
Gets the seed used to initialize the generator- Specified by:
getSeed
in interfaceStatisticalDistribution
- Overrides:
getSeed
in classParetoDistr
- Returns:
-
reseedRandomGenerator
public void reseedRandomGenerator(long seed) - Specified by:
reseedRandomGenerator
in interfaceorg.apache.commons.math3.distribution.RealDistribution
- Overrides:
reseedRandomGenerator
in classParetoDistr
-