public class LogarithmicGen extends RandomVariateGenInt
A local copy of the parameter θ is maintained in this class.
| Constructor and Description |
|---|
LogarithmicGen(RandomStream s,
double theta)
Creates a logarithmic random variate generator with parameters
θ = theta and default value
θ0 = 0.96,
using stream s.
|
LogarithmicGen(RandomStream s,
double theta,
double theta0)
Creates a logarithmic random variate generator with parameters
θ = theta and
θ0 =
|
LogarithmicGen(RandomStream s,
LogarithmicDist dist)
Creates a new generator with distribution dist and
stream s, with default value
θ0 = 0.96.
|
LogarithmicGen(RandomStream s,
LogarithmicDist dist,
double theta0)
Creates a new generator with distribution dist
and stream s, with
θ0 =
|
| Modifier and Type | Method and Description |
|---|---|
double |
getTheta()
Returns the θ associated with this object.
|
double |
getTheta0()
Returns the θ0 associated with this object.
|
int |
nextInt()
Generates a random number (an integer) from the discrete
distribution contained in this object.
|
static int |
nextInt(RandomStream s,
double theta)
Uses stream s to generate
a new variate from the logarithmic distribution with parameter
θ = theta.
|
getDistribution, nextArrayOfIntgetStream, nextArrayOfDouble, nextDouble, setStreampublic LogarithmicGen(RandomStream s, double theta)
public LogarithmicGen(RandomStream s, double theta, double theta0)
public LogarithmicGen(RandomStream s, LogarithmicDist dist)
public LogarithmicGen(RandomStream s, LogarithmicDist dist, double theta0)
public int nextInt()
RandomVariateGenIntnextInt in class RandomVariateGenIntpublic static int nextInt(RandomStream s, double theta)
public double getTheta()
public double getTheta0()
To submit a bug or ask questions, send an e-mail to Pierre L'Ecuyer.