|
SSJ V. 1.1.9. |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface RandomStreamFactory
Represents a random stream factory capable
of constructing some types of random streams.
A complex simulation program may need to construct
several random streams. If the class of random stream
needs to be changed in the future, it may be necessary
to modify several parts of the program.
A random stream factory allows the stream-specific
code for constructing a random stream to appear once
in the program rather than several times.
A factory is constructed from any class implementing
this interface, and the newInstance method is
used each time a new random stream is needed.
For example, to construct MRG32k3a streams,
a BasicRandomStreamFactory can be constructed.
Instead of using new MRG32k3a() to get a new stream,
the user calls the newInstance method of the created
factory. If the random stream happens to change, only
the construction code of the BasicRandomStreamFactory
needs to be updated.
| Method Summary | |
|---|---|
RandomStream |
newInstance()
Constructs and returns a new random stream. |
| Method Detail |
|---|
RandomStream newInstance()
RandomStreamInstantiationException.
RandomStreamInstantiationException - if the new
random stream cannot be instantiated.
|
SSJ V. 1.1.9. |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||