|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectjava.util.Random
nl.tudelft.simulation.jstats.streams.Java2Random
The Java2Random is an extention of the java.util.Random class
which implements the StreamInterface.
(c) copyright 2004 Delft
University of Technology , the Netherlands.
See for project information
www.simulation.tudelft.nl
License of use: General Public
License (GPL) , no warranty
| Field Summary | |
protected long |
seed
seed is a link to the seed value. |
| Fields inherited from class java.util.Random |
|
| Constructor Summary | |
Java2Random()
creates a new Java2Random and in initializes with System.currentTimeMillis constructs a new Java2Random |
|
Java2Random(long seed)
|
|
| Method Summary | |
long |
getSeed()
returns the seed of the generator |
int |
nextInt(int i,
int j)
Method returns (pseudo)random number from the stream over the integers i and j . |
void |
reset()
resets a stream |
void |
setSeed(long seed)
sets the seed of the generator |
| Methods inherited from class java.util.Random |
next, nextBoolean, nextBytes, nextDouble, nextFloat, nextGaussian, nextInt, nextInt, nextLong |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface nl.tudelft.simulation.jstats.streams.StreamInterface |
nextBoolean, nextDouble, nextFloat, nextInt, nextLong |
| Field Detail |
protected long seed
| Constructor Detail |
public Java2Random()
public Java2Random(long seed)
Random.Random(long)| Method Detail |
public void reset()
reset in interface StreamInterfaceStreamInterface.reset()
public int nextInt(int i,
int j)
StreamInterface
nextInt in interface StreamInterfacei - the minimal valuej - the maximum value
StreamInterface.nextInt(int,
int)public void setSeed(long seed)
StreamInterface
setSeed in interface StreamInterfaceRandom.setSeed(long)public long getSeed()
StreamInterface
getSeed in interface StreamInterfaceStreamInterface.getSeed()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||