eaLib API Docs
Last Modified : January 7 2002

mss.ea.rec
Class MPStringRecombination

java.lang.Object
  |
  +--mss.ea.core.GeneticOperator
        |
        +--mss.ea.rec.Recombination
              |
              +--mss.ea.rec.ChromosomeRecombination
                    |
                    +--mss.ea.rec.StringRecombination
                          |
                          +--mss.ea.rec.MPStringRecombination

public class MPStringRecombination
extends StringRecombination

Multipoint Crossover for strings. This operator generates two children out of two parents. For the number of intersections na obtains: 0 < na < width( string ).

Since:
0.1
Version:
0.1 (01-10-2001)
Author:
Andreas Rummler

Field Summary
protected  int intersection
          Number of intersections of the strings.
protected  java.util.Random rand
          Random generator.
 
Fields inherited from class mss.ea.rec.Recombination
quantity, required
 
Fields inherited from class mss.ea.core.GeneticOperator
description, ID, name
 
Constructor Summary
MPStringRecombination(int intersectionNumber)
          Constructor.
 
Method Summary
 Chromosome[] recombine(Chromosome[] cra)
          Performs the recombination.
 
Methods inherited from class mss.ea.rec.Recombination
getQuantity, getRequired
 
Methods inherited from class mss.ea.core.GeneticOperator
getDescription, getID, getName, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

rand

protected java.util.Random rand
Random generator.

intersection

protected int intersection
Number of intersections of the strings.
Constructor Detail

MPStringRecombination

public MPStringRecombination(int intersectionNumber)
Constructor.
Parameters:
intersectionNumber - number of intersections
Method Detail

recombine

public Chromosome[] recombine(Chromosome[] cra)
                       throws RecombinationException
Performs the recombination.
Overrides:
recombine in class ChromosomeRecombination
Parameters:
cra - array with at least two parents
Returns:
array with two children
Throws:
RecombinationException - never thrown in current state

eaLib API Docs
Last Modified : January 7 2002

Copyright © 2000-2001 Technical University of Ilmenau, Department ESS