|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
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 2003-2004 Delft
University of Technology , the Netherlands.
See for project information www.simulation.tudelft.nl
License of use: General Public
License (GPL) , 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 |
public 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.public double nextDouble()
public float nextFloat()
public int nextInt()
public int nextInt(int i,
int j)
i - the minimal valuej - the maximum value
public long nextLong()
public long getSeed()
public void setSeed(long seed)
seed - the new seedpublic void reset()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||