bcds.tools.random
Class RndPareto

java.lang.Object
  extended by bcds.tools.random.RndGenBase
      extended by bcds.tools.random.RndPareto
All Implemented Interfaces:
RndGen

public class RndPareto
extends RndGenBase
implements RndGen

Generates random values following a Pareto distribution.

Author:
Juan Segovia S.

Constructor Summary
RndPareto(double a, double k)
          Creates a new instance that uses the default randomness source.
RndPareto(java.util.Random rnd, double a, double k)
          Creates a new instance that uses rnd as the randomess source.
 
Method Summary
 double next()
          Returns a random value.
 
Methods inherited from class bcds.tools.random.RndGenBase
getRandomGen, setRandomGen
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface bcds.tools.random.RndGen
getRandomGen, setRandomGen
 

Constructor Detail

RndPareto

public RndPareto(double a,
                 double k)
Creates a new instance that uses the default randomness source. The parameter a is the minimum value of the random numbers to generate (this value must be positive) and k is the "shape" of the distribution. See http://en.wikipedia.org/wiki/Pareto_distribution and http://reference.wolfram.com/mathematica/ref/ParetoDistribution.html


RndPareto

public RndPareto(java.util.Random rnd,
                 double a,
                 double k)
Creates a new instance that uses rnd as the randomess source. The other two parameters are the same as in RndPareto(double, double).

Method Detail

next

public double next()
Returns a random value. This sample X is generated as follows: X = a / U^(1/k), where U is a random value in the range [0, 1) drawn from a uniform distribution.

Specified by:
next in interface RndGen