|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.util.Random
peersim.util.ExtendedRandom
public class ExtendedRandom
Extends the functionality of java.util.Random.
| Constructor Summary | |
|---|---|
ExtendedRandom(long seed)
Calls super constructor. |
|
| Method Summary | |
|---|---|
long |
getLastSeed()
Returns the last random seed that was set explicitly. |
long |
nextLong(long n)
Implements nextLong(long) the same way nexInt(int) is implemented in java.util.Random. |
int |
nextPoisson(double mean)
Extracts the next integer, according to a Poisson distribution. |
void |
setSeed(long seed)
Sets random seed. |
| 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 |
| Constructor Detail |
|---|
public ExtendedRandom(long seed)
getLastSeed().
| Method Detail |
|---|
public int nextPoisson(double mean)
mean - The mean of the Poisson distribution.
public long nextLong(long n)
n - the bound on the random number to be returned. Must be positive.
public void setSeed(long seed)
getLastSeed().
setSeed in class java.util.Randompublic long getLastSeed()
setSeed(long).
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||