SSJ
V. labo.

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

LogisticGen

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)
          .
LogisticGen(RandomStream s, double alpha, double lambda)
          .
LogisticGen(RandomStream s, LogisticDist dist)
          .
 
Method Summary
 double getAlpha()
          .
 double getLambda()
          .
static double nextDouble(RandomStream s, double alpha, double lambda)
          .
 
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)
. \begin{tabb}Creates a logistic random variate generator with parameters
 $\alpha...
 ...t{alpha} and $\lambda =$\ \texttt{lambda},
 using stream \texttt{s}.
 \end{tabb}


LogisticGen

public LogisticGen(RandomStream s)
. \begin{tabb}Creates a logistic random variate generator with parameters
 $\alpha = 0$\ and $\lambda =1$,
 using stream \texttt{s}.
 \end{tabb}


LogisticGen

public LogisticGen(RandomStream s,
                   LogisticDist dist)
. \begin{tabb}Creates a new generator for the logistic distribution
 \texttt{dist} and stream \texttt{s}.
 \end{tabb}

Method Detail

nextDouble

public static double nextDouble(RandomStream s,
                                double alpha,
                                double lambda)
. \begin{tabb}Generates a new variate from the {\em logistic\/} distribution
 with...
 ...tt{alpha} and $\lambda = $~\texttt{lambda},
 using stream \texttt{s}.
 \end{tabb}


getAlpha

public double getAlpha()
. \begin{tabb}Returns the parameter $\alpha$\ of this object.
 \end{tabb}


getLambda

public double getLambda()
. \begin{tabb}Returns the parameter $\lambda$\ of this object.
 \end{tabb}

 


SSJ
V. labo.

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