|
JavaGenes, NASA Ames. Written largely by Al Globus | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectgov.nasa.alsUtility.RandomNumber
single random number generator for the whole program. All distributions are flat unless name indicates otherwise. Modified 13 Dec 2002 to use colt MersenneTwister64
Field Summary | |
protected static long |
seed
|
Constructor Summary | |
RandomNumber()
|
Method Summary | |
static void |
fillRandomly(IntegerInterval interval,
int[] results)
fill results with random numbers in integer i inclusive. |
static boolean |
getBoolean()
flip a virtual coin |
static double |
getDouble()
|
static double |
getDouble(double high)
|
static double |
getDouble(DoubleInterval i)
|
static double |
getGaussian()
|
static double |
getGaussian(double standardDeviation)
|
static int |
getIndex(int limit)
|
static int |
getInteger(IntegerInterval i)
|
static int |
getIntFromArray(int[] array)
|
static java.lang.Object |
getObjectFromArray(java.lang.Object[] array)
|
static boolean |
getProbability(double probability)
|
static long |
getSeed()
|
static java.lang.String |
getStringFromArray(java.lang.String[] array)
|
static int |
getUniqueIndex(int limit,
int avoid)
|
static Vector3d |
getVector3d(DoubleInterval i)
|
static void |
initialize()
|
static void |
setSeed(long value)
set the random number generator seed. |
static void |
test()
for testing run: java RandomNumber buckets trials |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected static long seed
Constructor Detail |
public RandomNumber()
Method Detail |
public static void initialize()
public static double getDouble()
public static double getDouble(double high)
public static boolean getProbability(double probability)
public static double getDouble(DoubleInterval i)
public static Vector3d getVector3d(DoubleInterval i)
public static double getGaussian()
public static double getGaussian(double standardDeviation)
public static int getInteger(IntegerInterval i)
public static void fillRandomly(IntegerInterval interval, int[] results)
public static boolean getBoolean()
public static void setSeed(long value)
public static long getSeed()
public static int getIntFromArray(int[] array)
public static java.lang.Object getObjectFromArray(java.lang.Object[] array)
public static java.lang.String getStringFromArray(java.lang.String[] array)
public static int getIndex(int limit)
public static int getUniqueIndex(int limit, int avoid)
public static void test()
java RandomNumber buckets trials
|
JavaGenes, NASA Ames. Written largely by Al Globus | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |