|
SSJ V. 2.6. |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectumontreal.iro.lecuyer.randvar.RandomVariateGen
umontreal.iro.lecuyer.randvar.ConstantGen
public class ConstantGen
This class implements a random variate generator that returns a constant value. Its mass function is
| Constructor Summary | |
|---|---|
ConstantGen(double val)
Constructs a new constant generator returning the given value val. |
|
| Method Summary | |
|---|---|
void |
nextArrayOfDouble(double[] v,
int start,
int n)
Generates n random numbers from the continuous distribution contained in this object. |
double |
nextDouble()
Generates a random number from the continuous distribution contained in this object. |
| Methods inherited from class umontreal.iro.lecuyer.randvar.RandomVariateGen |
|---|
getDistribution, getStream, setStream, toString |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public ConstantGen(double val)
| Method Detail |
|---|
public double nextDouble()
RandomVariateGeninverseF
method of the distribution object.
Alternative generating methods are provided in subclasses.
nextDouble in class RandomVariateGen
public void nextArrayOfDouble(double[] v,
int start,
int n)
RandomVariateGennextDouble() n
times, but one can override it in subclasses for better efficiency.
nextArrayOfDouble in class RandomVariateGenv - array in which the variates will be storedstart - starting index, in v, of the new variatesn - number of variates to generate
|
SSJ V. 2.6. |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||