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:
java.io.Serializable
,org.apache.commons.math3.distribution.RealDistribution
,ContinuousDistribution
public class LomaxDistr extends ParetoDistr implements ContinuousDistribution
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:
- Serialized Form
-
Field Summary
Fields inherited from class org.apache.commons.math3.distribution.ParetoDistribution
DEFAULT_INVERSE_ABSOLUTE_ACCURACY
-
Constructor Summary
Constructors Constructor Description LomaxDistr(double shape, double location, double shift)
Creates a lomax Pseudo-Random Number Generator (RNG) using the current time as seed.LomaxDistr(double shape, double location, double shift, long seed)
Creates a lomax Pseudo-Random Number Generator (RNG).LomaxDistr(double shape, double location, double shift, long seed, org.apache.commons.math3.random.RandomGenerator rng)
Creates a lomax 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)
double
sample()
Generate a new pseudo random number.Methods inherited from class org.apache.commons.math3.distribution.ParetoDistribution
cumulativeProbability, cumulativeProbability, density, getNumericalMean, getNumericalVariance, getScale, getShape, getSolverAbsoluteAccuracy, getSupportLowerBound, getSupportUpperBound, isSupportConnected, isSupportLowerBoundInclusive, isSupportUpperBoundInclusive, logDensity
-
Constructor Details
-
LomaxDistr
public LomaxDistr(double shape, double location, double shift)Creates a lomax 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 distributionlocation
- the location parameter of this distributionshift
- the shift parameter of this distribution- See Also:
LomaxDistr(double, double, double, long, RandomGenerator)
-
LomaxDistr
public LomaxDistr(double shape, double location, double shift, long seed)Creates a lomax 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 distributionlocation
- the location parameter of this distributionshift
- the shift parameter of this distributionseed
- the seed- See Also:
LomaxDistr(double, double, double, long, RandomGenerator)
-
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 (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 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:ContinuousDistribution
Generate a new pseudo random number.- Specified by:
sample
in interfaceContinuousDistribution
- Specified by:
sample
in interfaceorg.apache.commons.math3.distribution.RealDistribution
- 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:ContinuousDistribution
Gets the seed used to initialize the generator- Specified by:
getSeed
in interfaceContinuousDistribution
- 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
-