|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.util.Random
jp.ac.hiroshima_u.sci.math.saito.tinymt.TinyMT
public class TinyMT
TinyMT is a pseudo random number generator.
To get an instance, call getDefault(long)
.
This class is not synchronized, One way to use TinyMT in multithread
environment is to use an instance per a thread.
This class supports jump function.
User can get an array of pseudo random number generators by calling
getDefaultArray(int, long, int)
.
Currently this class supports only one parameter of TinyMT.
Method Summary | |
---|---|
static TinyMT |
getDefault(long seed)
Factory method which returns the TinyMT with the first generated parameter of TinyMTDC. |
static TinyMT[] |
getDefaultArray(int num,
long seed,
int jump)
make and return an array of TinyMT. |
void |
setSeed(int[] seeds)
seeding by array of integers. |
void |
setSeed(long seed)
|
void |
setSeed(java.lang.String seed)
seeding by string, This will be convenient. |
Methods inherited from class java.util.Random |
---|
nextBoolean, nextBytes, nextDouble, nextFloat, nextGaussian, nextInt, nextInt, nextLong |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public void setSeed(long seed)
setSeed
in class java.util.Random
public void setSeed(java.lang.String seed)
seed
- seed of pseudo random numberspublic void setSeed(int[] seeds)
seeds
- seeds of pseudo random numbers.public static TinyMT getDefault(long seed)
seed
- seed of pseudo random numbers.
public static TinyMT[] getDefaultArray(int num, long seed, int jump)
seed
- seed of first elementjump
- step is jump * 264
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |