|
SSJ V. 2.6. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object umontreal.iro.lecuyer.randvar.RandomVariateGen umontreal.iro.lecuyer.randvar.ExponentialGen umontreal.iro.lecuyer.randvar.ExponentialInverseFromDensityGen
public class ExponentialInverseFromDensityGen
This class implements exponential random variate generators
using numerical inversion of the exponential density
as described in. It makes use of the class
InverseDistFromDensity
.
Generating exponential random variables by inversion usually requires
the computation of a logarithm for each generated random number.
Numerical inversion precomputes a set of tables that will speed up the
generation of random variables. This is useful if one
wants to generate a large number of random variables.
Constructor Summary | |
---|---|
ExponentialInverseFromDensityGen(RandomStream stream,
double lambda,
double ueps,
int order)
Creates an exponential random variate generator with parameter λ = lambda, using stream stream. |
|
ExponentialInverseFromDensityGen(RandomStream stream,
ExponentialDist dist,
double ueps,
int order)
Similar to the above constructor, with the exponential distribution dist. |
|
ExponentialInverseFromDensityGen(RandomStream stream,
InverseDistFromDensity dist)
Creates a new exponential generator using the exponential distribution dist and stream stream. |
Method Summary | |
---|---|
int |
getOrder()
Returns the order of the interpolating polynomial. |
double |
getUepsilon()
Returns the u-resolution ueps. |
Methods inherited from class umontreal.iro.lecuyer.randvar.ExponentialGen |
---|
getLambda, nextDouble |
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 |
---|
public ExponentialInverseFromDensityGen(RandomStream stream, double lambda, double ueps, int order)
public ExponentialInverseFromDensityGen(RandomStream stream, ExponentialDist dist, double ueps, int order)
public ExponentialInverseFromDensityGen(RandomStream stream, InverseDistFromDensity dist)
getDistribution
,
after using one of the other constructors to create the
precomputed tables. This is useful when one needs many generators
using the same exponential distribution
(same λ). Precomputing tables for numerical inversion is
costly; thus using only one set of tables for many generators
is more efficient. The first ExponentialInverseFromDensityGen
generator
using the other constructors creates the precomputed tables.
Then all other streams use this constructor with the same set of tables.
Method Detail |
---|
public double getUepsilon()
public int getOrder()
|
SSJ V. 2.6. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |