|
ContactCenters V. 0.9.9. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectumontreal.iro.lecuyer.contactcenters.RandomStreamUtil
public class RandomStreamUtil
Provides utility methods to create and extend arrays of random streams.
Method Summary | |
---|---|
static RandomStream[] |
createRandomStreamArray(RandomStream[] oldArray,
int size,
RandomStreamFactory rsf)
Creates or extends an array of random streams. |
static RandomStream[][] |
createRandomStreamMatrix(RandomStream[][] oldMatrix,
int rows,
int columns,
RandomStreamFactory rsf)
Creates or extends a matrix (i.e., 2D array) of random streams. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static RandomStream[] createRandomStreamArray(RandomStream[] oldArray, int size, RandomStreamFactory rsf)
If oldArray is null, a new array of length size will be allocated and filled with random streams. If oldArray is not null and its length is greater than or equal to size, it is returned unchanged. Otherwise, a new array is created, the already constructed random streams are copied and new ones are constructed to fill the array. The random streams are created using the given random stream factory. The method returns an array of random streams with length greater than or equal to size.
oldArray
- the old array of random streams.size
- the minimal size of the returned array.rsf
- the random stream factory used to create the random streams.
public static RandomStream[][] createRandomStreamMatrix(RandomStream[][] oldMatrix, int rows, int columns, RandomStreamFactory rsf)
If oldMatrix is null, a new array of length rows
will be allocated and filled with
arrays of random streams. If oldMatrix is
not null and its length is greater than or equal to
rows, it is returned unchanged. Otherwise, a new array is
created, the already constructed arrays of random streams are copied and new ones
are constructed to fill the array. The internal
arrays of random streams are created using
createRandomStreamArray(RandomStream[],int,RandomStreamFactory)
.
oldMatrix
- the old matrix of random streams.rows
- the required number of rows.columns
- the required number of columns.rsf
- the random stream factory used to create streams.
|
ContactCenters V. 0.9.9. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |