Class ZipfDistr

java.lang.Object
org.cloudbus.cloudsim.distributions.ZipfDistr
All Implemented Interfaces:
ContinuousDistribution

public class ZipfDistr
extends java.lang.Object
implements ContinuousDistribution
A Pseudo-Random Number Generator following the Zipf distribution.
Since:
CloudSim Toolkit 1.0
Author:
Marcos Dias de Assuncao, Manoel Campos da Silva Filho
  • Field Summary

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

    NULL
  • Constructor Summary

    Constructors 
    Constructor Description
    ZipfDistr​(double shape, int population)
    Creates a Zipf Pseudo-Random Number Generator (RNG).
    ZipfDistr​(double shape, int population, long seed)
    Creates a Zipf Pseudo-Random Number Generator (RNG).
    ZipfDistr​(double shape, int population, long seed, org.apache.commons.math3.random.RandomGenerator rng)
    Creates a Zipf Pseudo-Random Number Generator (RNG).
  • Method Summary

    Modifier and Type Method Description
    long getSeed()
    Gets the seed used to initialize the generator
    double sample()
    Generate a new pseudo random number.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • ZipfDistr

      public ZipfDistr​(double shape, int population)
      Creates a Zipf 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 distribution parameter
      population - the population distribution parameter
      See Also:
      ZipfDistr(double, int, long, RandomGenerator)
    • ZipfDistr

      public ZipfDistr​(double shape, int population, long seed)
      Creates a Zipf 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 distribution parameter
      population - the population distribution parameter
      seed - the seed
      See Also:
      ZipfDistr(double, int, long, RandomGenerator)
    • ZipfDistr

      public ZipfDistr​(double shape, int population, long seed, org.apache.commons.math3.random.RandomGenerator rng)
      Creates a Zipf Pseudo-Random Number Generator (RNG).
      Parameters:
      shape - the shape distribution parameter
      population - the population distribution parameter
      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