SSJ
V. 2.6.

umontreal.iro.lecuyer.randvar
Class WeibullGen

java.lang.Object
  extended by umontreal.iro.lecuyer.randvar.RandomVariateGen
      extended by umontreal.iro.lecuyer.randvar.WeibullGen

public class WeibullGen
extends RandomVariateGen

This class implements random variate generators for the Weibull distribution. Its density is

f (x) = αλα(x - δ)α-1exp[- (λ(x - δ))α]         for x > δ,

and f (x) = 0 elsewhere, where α > 0, and λ > 0.

The (non-static) nextDouble method simply calls inverseF on the distribution.


Constructor Summary
WeibullGen(RandomStream s, double alpha)
          Creates a Weibull random variate generator with parameters α = alpha, λ = 1 and δ = 0, using stream s.
WeibullGen(RandomStream s, double alpha, double lambda, double delta)
          Creates a Weibull random variate generator with parameters α = alpha, λ = lambda and δ = delta, using stream s.
WeibullGen(RandomStream s, WeibullDist dist)
          Creates a new generator for the Weibull distribution dist and stream s.
 
Method Summary
 double getAlpha()
          Returns the parameter α.
 double getDelta()
          Returns the parameter δ.
 double getLambda()
          Returns the parameter λ.
static double nextDouble(RandomStream s, double alpha, double lambda, double delta)
          Uses inversion to generate a new variate from the Weibull distribution with parameters α = alpha, λ = lambda, and δ = delta, using stream s.
 void setParams(double alpha, double lambda, double delta)
          Sets the parameters α, λ and δ for this object.
 
Methods inherited from class umontreal.iro.lecuyer.randvar.RandomVariateGen
getDistribution, getStream, nextArrayOfDouble, nextDouble, setStream, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

WeibullGen

public WeibullGen(RandomStream s,
                  double alpha,
                  double lambda,
                  double delta)
Creates a Weibull random variate generator with parameters α = alpha, λ = lambda and δ = delta, using stream s.


WeibullGen

public WeibullGen(RandomStream s,
                  double alpha)
Creates a Weibull random variate generator with parameters α = alpha, λ = 1 and δ = 0, using stream s.


WeibullGen

public WeibullGen(RandomStream s,
                  WeibullDist dist)
Creates a new generator for the Weibull distribution dist and stream s.

Method Detail

nextDouble

public static double nextDouble(RandomStream s,
                                double alpha,
                                double lambda,
                                double delta)
Uses inversion to generate a new variate from the Weibull distribution with parameters α = alpha, λ = lambda, and δ = delta, using stream s.


getAlpha

public double getAlpha()
Returns the parameter α.


getLambda

public double getLambda()
Returns the parameter λ.


getDelta

public double getDelta()
Returns the parameter δ.


setParams

public void setParams(double alpha,
                      double lambda,
                      double delta)
Sets the parameters α, λ and δ for this object.


SSJ
V. 2.6.

To submit a bug or ask questions, send an e-mail to Pierre L'Ecuyer.