art.util
Class MyRandomMaker

java.lang.Object
  extended byart.util.MyRandomMaker

public class MyRandomMaker
extends java.lang.Object

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.

Author:
Marco Lamieri and Gianluigi Ferraris

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

MyRandomMaker

public MyRandomMaker(long aSeed)
The constructor of the class.

Parameters:
aSeed - Seed of primary randomizer
Method Detail

getRandomizer

public java.util.Random getRandomizer()
This method generate a brand new random number generator.

Returns:
New random number generator.

getSeed

public long getSeed()
Get the seed of the primary random number generator

Returns:
Seed