bsoc.genetic
Class CrossoverSwitch

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

public class CrossoverSwitch
extends java.lang.Object

A Crossover switch which generates a boolean that switches from true to false after random intervals. The interval length is normal distributed.


Constructor Summary
CrossoverSwitch(int mean, int var)
          Undefined initialisation of the random generator.
CrossoverSwitch(int mean, int var, long seed)
           
 
Method Summary
 boolean takeA()
          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

CrossoverSwitch

public CrossoverSwitch(int mean,
                       int var,
                       long seed)
Parameters:
mean - The mean length of an interval.
var - The variance of the length of the interval.
seed - Initial Value for the random generator.

CrossoverSwitch

public CrossoverSwitch(int mean,
                       int var)
Undefined initialisation of the random generator.
Method Detail

takeA

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