public class RayleighGen extends RandomVariateGen
| f (x) | = | (x-a) e-(x-a)2/(2β2)/β2 for x >= a | |
| f (x) | = | 0 for x < a, |
| Constructor and Description |
|---|
RayleighGen(RandomStream s,
double beta)
Creates a Rayleigh random variate generator with parameters
a = 0 and β = beta, using stream s.
|
RayleighGen(RandomStream s,
double a,
double beta)
Creates a Rayleigh random variate generator with parameters
a = a and β = beta, using stream s.
|
RayleighGen(RandomStream s,
RayleighDist dist)
Creates a new generator for the Rayleigh distribution dist
and stream s.
|
| Modifier and Type | Method and Description |
|---|---|
double |
getA()
Returns the parameter a.
|
double |
getSigma()
Returns the parameter β.
|
static double |
nextDouble(RandomStream s,
double a,
double beta)
Uses inversion to generate a new variate from the Rayleigh
distribution with parameters a = a and
β = beta, using stream s.
|
void |
setParams(double a,
double beta)
Sets the parameters a = a and β = beta
for this object.
|
getDistribution, getStream, nextArrayOfDouble, nextDouble, setStreampublic RayleighGen(RandomStream s, double a, double beta)
public RayleighGen(RandomStream s, double beta)
public RayleighGen(RandomStream s, RayleighDist dist)
public static double nextDouble(RandomStream s, double a, double beta)
public double getA()
public double getSigma()
public void setParams(double a,
double beta)
To submit a bug or ask questions, send an e-mail to Pierre L'Ecuyer.