|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--cad.simcad.utilz.random.MersenneTwisterFast | +--cad.simcad.utilz.random.MTFAdapter
Used as a wrapper for the MersenneTwister class
Constructor Summary | |
MTFAdapter()
Creates new MTChild |
|
MTFAdapter(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.MersenneTwisterFast |
main, nextBoolean, nextByte, nextBytes, nextChar, nextDouble, nextFloat, nextGaussian, nextInt, nextInt, nextLong, nextShort, setSeed |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public MTFAdapter(long seed)
public MTFAdapter()
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
n
- an integer valuejava.lang.IllegalArgumentException
- if n =< 0
|
![]() |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |