Overview | Package | Class | Tree | Deprecated | Index | Help
| SSJ V. 2.1.1.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## umontreal.iro.lecuyer.randvar
Class WeibullGen

    java.lang.Object
      umontreal.iro.lecuyer.randvar.RandomVariateGen
          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`

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, 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.

Overview | Package | Class | Tree | Deprecated | Index | Help
| SSJ V. 2.1.1.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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