|
SSJ V. 2.0. |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectumontreal.iro.lecuyer.rng.RandomPermutation
public class RandomPermutation
Provides methods to randomly shuffle arrays or lists using a random stream.
| Constructor Summary | |
|---|---|
RandomPermutation()
|
|
| Method Summary | |
|---|---|
static void |
shuffle(boolean[] array,
RandomStream stream)
Randomly permutes the array array using random stream stream. |
static void |
shuffle(byte[] array,
RandomStream stream)
Randomly permutes the array array using random stream stream. |
static void |
shuffle(char[] array,
RandomStream stream)
Randomly permutes the array array using random stream stream. |
static void |
shuffle(double[] array,
RandomStream stream)
Randomly permutes the array array using random stream stream. |
static void |
shuffle(float[] array,
RandomStream stream)
Randomly permutes the array array using random stream stream. |
static void |
shuffle(int[] array,
RandomStream stream)
Randomly permutes the array array using random stream stream. |
static void |
shuffle(List<?> list,
RandomStream stream)
|
static void |
shuffle(long[] array,
RandomStream stream)
Randomly permutes the array array using random stream stream. |
static void |
shuffle(Object[] array,
RandomStream stream)
Randomly permutes the array array using random stream stream. |
static void |
shuffle(short[] array,
RandomStream stream)
Randomly permutes the array array using random stream stream. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public RandomPermutation()
| Method Detail |
|---|
public static void shuffle(List<?> list,
RandomStream stream)
public static void shuffle(Object[] array,
RandomStream stream)
array - the array being shuffled.stream - the random stream used to generate random numbers.
public static void shuffle(byte[] array,
RandomStream stream)
array - the array being shuffled.stream - the random stream used to generate random numbers.
public static void shuffle(short[] array,
RandomStream stream)
array - the array being shuffled.stream - the random stream used to generate random numbers.
public static void shuffle(int[] array,
RandomStream stream)
array - the array being shuffled.stream - the random stream used to generate random numbers.
public static void shuffle(long[] array,
RandomStream stream)
array - the array being shuffled.stream - the random stream used to generate random numbers.
public static void shuffle(char[] array,
RandomStream stream)
array - the array being shuffled.stream - the random stream used to generate random numbers.
public static void shuffle(boolean[] array,
RandomStream stream)
array - the array being shuffled.stream - the random stream used to generate random numbers.
public static void shuffle(float[] array,
RandomStream stream)
array - the array being shuffled.stream - the random stream used to generate random numbers.
public static void shuffle(double[] array,
RandomStream stream)
array - the array being shuffled.stream - the random stream used to generate random numbers.
|
SSJ V. 2.0. |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||