bsoc.genetic
Class Mutator

java.lang.Object
  |
  +--bsoc.genetic.Mutator

public class Mutator
extends java.lang.Object

Generates a serie of booleans. The probability of true is the mutation rate.


Constructor Summary
Mutator(int mutRate)
          Undefined initialisation of the random generator.
Mutator(int mutRate, long seed)
          Generates a mutator that gives a serie of booleans where the probabillity of true is the mutation rate.
 
Method Summary
 boolean isMutation()
          Returns the next value of the boolean sequence.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Mutator

public Mutator(int mutRate,
               long seed)
Generates a mutator that gives a serie of booleans where the probabillity of true is the mutation rate.
Parameters:
mutRate - The mutation rate in per million. Values must be between 0 and 1000000.
seed - Initial Value for the random generator.

Mutator

public Mutator(int mutRate)
Undefined initialisation of the random generator.
Method Detail

isMutation

public boolean isMutation()
Returns the next value of the boolean sequence. Ca be used to determine if a mutation has to take place or not.