|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface StreamInterface
The StreamInterface defines the streams to be used within the JSTATS package. Potential implementations include the pseudo random stream, the fully one-time random stream, etc.
(c) copyright 2002-2005-2004 Delft
University of Technology , the Netherlands.
See for project information www.simulation.tudelft.nl
License of use: Lesser
General Public License (LGPL) , no warranty.
Method Summary | |
---|---|
long |
getSeed()
returns the seed of the generator |
boolean |
nextBoolean()
Returns the next pseudorandom, uniformly distributed boolean
value from this random number generator's sequence. |
double |
nextDouble()
Method return a (pseudo)random number from the stream over the interval (0,1) using this stream, after advancing its state by one step. |
float |
nextFloat()
Method return a (pseudo)random number from the stream over the interval (0,1) using this stream, after advancing its state by one step. |
int |
nextInt()
Method return a (pseudo)random number from the stream over using this stream, after advancing its state by one step. |
int |
nextInt(int i,
int j)
Method returns (pseudo)random number from the stream over the integers i and j . |
long |
nextLong()
Method return a (pseudo)random number from the stream over using this stream, after advancing its state by one step. |
void |
reset()
resets the stream |
void |
setSeed(long seed)
sets the seed of the generator |
Method Detail |
---|
boolean nextBoolean()
boolean
value from this random number generator's sequence. The general contract
of nextBoolean is that one boolean value is
pseudorandomly generated and returned. The values true
and
false
are produced with (approximately) equal probability.
The method nextBoolean is implemented by class Random
as follows: public boolean nextBoolean() { return next(1) != 0; }
boolean
value from this random number generator's sequence.double nextDouble()
float nextFloat()
int nextInt()
int nextInt(int i, int j)
i
- the minimal valuej
- the maximum value
long nextLong()
long getSeed()
void setSeed(long seed)
seed
- the new seedvoid reset()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |