|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Object | +--org.mmbase.util.RandomPool
Class for holding a pool of random numbers.
Calling stir(long) takes care of generating a new 'random' number.
Calling value() returns the current random number.
| Constructor Summary | |
RandomPool()
Create a pool. |
|
RandomPool(long init)
Create a pool. |
|
| Method Summary | |
void |
stir(long x)
Maintain a pool of randomness using a modified 64-bit congruential generator with multipliers dynamically selected from a set of pseudo-random values. |
long |
value_and_stir()
Stirs, then returns the (new) current random value. |
long |
value_and_stir(long mix)
Stirs, then returns the (new) current random value. |
long |
value()
Returns the current random value. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public RandomPool()
public RandomPool(long init)
init - the source of randomness| Method Detail |
public void stir(long x)
x - the source of randomnesspublic long value()
public long value_and_stir()
public long value_and_stir(long mix)
init - the source of randomness for stirring
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||