SSJ
V. 2.6.

umontreal.iro.lecuyer.randvar
Class LogisticGen

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

public class LogisticGen
extends RandomVariateGen

This class implements random variate generators for the logistic distribution. Its parameters are α and λ > 0. Its density function is

f (x) = λe-λ(x-α)/[(1 + e-λ(x-α))2] for - ∞ < x < ∞.

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


Constructor Summary
LogisticGen(RandomStream s)
          Creates a logistic random variate generator with parameters α = 0 and λ = 1, using stream s.
LogisticGen(RandomStream s, double alpha, double lambda)
          Creates a logistic random variate generator with parameters α = alpha and λ = lambda, using stream s.
LogisticGen(RandomStream s, LogisticDist dist)
          Creates a new generator for the logistic distribution dist and stream s.
 
Method Summary
 double getAlpha()
          Returns the parameter α of this object.
 double getLambda()
          Returns the parameter λ of this object.
static double nextDouble(RandomStream s, double alpha, double lambda)
          Generates a new variate from the logistic distribution with parameters α = alpha and λ = lambda, using stream s.
 
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

LogisticGen

public LogisticGen(RandomStream s,
                   double alpha,
                   double lambda)
Creates a logistic random variate generator with parameters α = alpha and λ = lambda, using stream s.


LogisticGen

public LogisticGen(RandomStream s)
Creates a logistic random variate generator with parameters α = 0 and λ = 1, using stream s.


LogisticGen

public LogisticGen(RandomStream s,
                   LogisticDist dist)
Creates a new generator for the logistic distribution dist and stream s.

Method Detail

nextDouble

public static double nextDouble(RandomStream s,
                                double alpha,
                                double lambda)
Generates a new variate from the logistic distribution with parameters α = alpha and λ = lambda, using stream s.


getAlpha

public double getAlpha()
Returns the parameter α of this object.


getLambda

public double getLambda()
Returns the parameter λ of this object.


SSJ
V. 2.6.

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