SSJ  3.3.1 Stochastic Simulation in Java
CloneableRandomStream Interface Reference

CloneableRandomStream extends RandomStream and Cloneable. More...

Inheritance diagram for CloneableRandomStream:
[legend]
Collaboration diagram for CloneableRandomStream:
[legend]

## Public Member Functions

CloneableRandomStream clone ()
Clones the current object and returns its copy. More...

Public Member Functions inherited from RandomStream
void resetStartStream ()
Reinitializes the stream to its initial state $$I_g$$: $$C_g$$ and $$B_g$$ are set to $$I_g$$.

void resetStartSubstream ()
Reinitializes the stream to the beginning of its current substream: $$C_g$$ is set to $$B_g$$.

void resetNextSubstream ()
Reinitializes the stream to the beginning of its next substream: $$N_g$$ is computed, and $$C_g$$ and $$B_g$$ are set to $$N_g$$.

String toString ()
Returns a string containing the current state of this stream. More...

double nextDouble ()
Returns a (pseudo)random number from the uniform distribution over the interval $$(0,1)$$, using this stream, after advancing its state by one step. More...

void nextArrayOfDouble (double[] u, int start, int n)
Generates n (pseudo)random numbers from the uniform distribution and stores them into the array u starting at index start. More...

int nextInt (int i, int j)
Returns a (pseudo)random number from the discrete uniform distribution over the integers $$\{i,i+1,…,j\}$$, using this stream. More...

void nextArrayOfInt (int i, int j, int[] u, int start, int n)
Generates n (pseudo)random numbers from the discrete uniform distribution over the integers $$\{i,i+1,…,j\}$$, using this stream and stores the result in the array u starting at index start. More...

## Detailed Description

CloneableRandomStream extends RandomStream and Cloneable.

All classes that implements this interface are able to produce cloned objects.

The cloned object is entirely independent of the older odject. Moreover the cloned object has all the same properties as the older one. All his seeds are duplicated, and therefore both generators will produce the same random number sequence.

## ◆ clone()

 CloneableRandomStream clone ( )

Clones the current object and returns its copy.

Returns
A deep copy of the current object

The documentation for this interface was generated from the following file:
• CloneableRandomStream.java