|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjbil.util.RandomUtilities
public class RandomUtilities
Assorted Random utility functions.
| Constructor Summary | |
|---|---|
RandomUtilities()
|
|
| Method Summary | |
|---|---|
static int[] |
pickAtRandom(int howMany,
int upperLimit)
Pick integers at random with equal probabilities and without repositions in the range from 0 up to a given upper limit (not inclusive). |
static int[] |
shuffle(int N)
Creates an array containing the elements 0...N-1 in random order. |
static void |
shuffle(int[] v)
Shuffles an int array. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public RandomUtilities()
| Method Detail |
|---|
public static int[] shuffle(int N)
N - The number of the elements of the array.public static void shuffle(int[] v)
v - the array to be shuffled.
public static int[] pickAtRandom(int howMany,
int upperLimit)
howMany - How many integers to pickupperLimit - the upper limit value (not inclusive)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||