|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.util.Random | +--cad.simcad.utilz.random.MersenneTwister | +--cad.simcad.utilz.random.MTAdapter
Used as a wrapper for the MersenneTwister class
Constructor Summary | |
MTAdapter()
Creates new MTChild |
|
MTAdapter(long seed)
Creates new MTChild |
Method Summary | |
int |
getNextInt()
Returns the next pseudorandom, uniformly distributed int
value from this random number generator's sequence. |
int |
getNextInt(int n)
Returns an integer drawn uniformly from 0 to n-1. |
Methods inherited from class cad.simcad.utilz.random.MersenneTwister |
main, next, nextBoolean, nextByte, nextBytes, nextChar, nextDouble, nextFloat, nextInt, nextShort, setSeed |
Methods inherited from class java.util.Random |
nextGaussian, nextInt, nextLong |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public MTAdapter(long seed)
public MTAdapter()
Method Detail |
public int getNextInt()
RandomGenerator
int
value from this random number generator's sequence. The general
contract of nextInt is that one int value is
pseudorandomly generated and returned. All 232
possible int values are produced with
(approximately) equal probability.
getNextInt
in interface RandomGenerator
int
value from this random number generator's sequence.public int getNextInt(int n)
getNextInt
in interface RandomGenerator
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |