public interface RandomStreamFactory
newInstance method
each time a new random stream is needed, instead of invoking
directly the specific constructor of the desired type.
Hence, if several random streams of a given type (class) must be
constructed at different places in a large simulation program,
and if we decide to change the type of stream in the future,
there is no need to change the code at those different places.
With the random stream factory, the class-specific
code for constructing these streams appears at a single place,
where the factory is constructed.
The class BasicRandomStreamFactory provides an
implementation of this interface.
| Modifier and Type | Method and Description |
|---|---|
RandomStream |
newInstance()
Constructs and returns a new random stream.
|
RandomStream newInstance()
RandomStreamInstantiationException.RandomStreamInstantiationException - if the new
random stream cannot be instantiated.To submit a bug or ask questions, send an e-mail to Pierre L'Ecuyer.