public interface RandomVariate
The common interface for all random variate generation classes and the parent interface for specialized random variate interfaces. Typically an instance is retrieved using an Abstract Factory, handing the factory a String with the name of the algorithm and (optionally) either the name of the RandomNumber instance or a reference to one.
The generate method returns a double
since a random variate can always be cast to one. More specialized classes
may choose to generate an int or some other thing.
Modifier and Type | Method and Description |
---|---|
double |
generate()
Generate a random variate having this class's distribution.
|
java.lang.Object[] |
getParameters()
Returns the array of parameters as an Object[].
|
RandomNumber |
getRandomNumber()
Returns the instance of the supporting RandomNumber
|
void |
setParameters(java.lang.Object... params)
Sets the random variate's parameters.
|
void |
setRandomNumber(RandomNumber rng)
Sets the supporting RandomNumber object
|
double generate()
void setParameters(java.lang.Object... params)
params
- the array of parameters, wrapped in objects.java.lang.Object[] getParameters()
void setRandomNumber(RandomNumber rng)
rng
- The RandomNumber instance supporting the generating algorithmRandomNumber getRandomNumber()