public final class RandUtils extends Object
Modifier and Type | Method and Description |
---|---|
static boolean |
nextBoolean() |
static double |
nextDouble() |
static float |
nextFloat() |
static float |
nextFloat(float min,
float max) |
static double |
nextGaussian() |
static int |
nextInt()
Get an int in the range of a signed int.
|
static int |
nextInt(int max)
Get an int in the range [0, max).
|
static long |
nextLong() |
static void |
pairedShuffle(List... lists)
Shuffle multiple lists, but keep the elements that share indexes together.
|
static <T> void |
pairedShuffleIndexes(List<T> list,
int[] indexes)
A version of pairedShuffle() optimized for very specific list types.
|
static void |
seed(int seed) |
static void |
shuffle(List<?> list) |
public static void seed(int seed)
public static boolean nextBoolean()
public static double nextDouble()
public static float nextFloat()
public static float nextFloat(float min, float max)
public static double nextGaussian()
public static int nextInt()
public static int nextInt(int max)
public static long nextLong()
public static void shuffle(List<?> list)
@SafeVarargs public static void pairedShuffle(List... lists)
public static <T> void pairedShuffleIndexes(List<T> list, int[] indexes)
Copyright © 2020 University of California, Santa Cruz. All rights reserved.