|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectart.util.MyRandomMaker
This class create random number generators. From any instance of MyRandomMaker is possible to create many random number generators starting from a given seed.
There is a primary random number generator that thake the given seed and generate as result other seeds. Every time the getRandomizer() method is called a new random number generator is created with as seed the nextInt() produced by the primary random number generator.
This aproach give the advantage to have many indipendent and different random number generator one for each chromosome of the population. It is also possible to control the starting seed of the random number generator all together just setting the primary random number generator seed. The primary random number generator seed is the one that is getted from Configuration.
| Constructor Summary | |
MyRandomMaker(long aSeed)
The constructor of the class. |
|
| Method Summary | |
java.util.Random |
getRandomizer()
This method generate a brand new random number generator. |
long |
getSeed()
Get the seed of the primary random number generator |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public MyRandomMaker(long aSeed)
aSeed - Seed of primary randomizer| Method Detail |
public java.util.Random getRandomizer()
public long getSeed()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||