The Encog Project

org.encog.solve.genetic
Class MateWorker<GENE_TYPE>

java.lang.Object
  extended by org.encog.solve.genetic.MateWorker<GENE_TYPE>
Type Parameters:
GENE_TYPE - The data type of the gene.
All Implemented Interfaces:
java.lang.Runnable, EncogTask

public class MateWorker<GENE_TYPE>
extends java.lang.Object
implements EncogTask

This class is used in conjunction with a thread pool. This allows the genetic algorithm to offload all of those calculations to a thread pool.


Constructor Summary
MateWorker(Chromosome<GENE_TYPE> mother, Chromosome<GENE_TYPE> father, Chromosome<GENE_TYPE> child1, Chromosome<GENE_TYPE> child2)
           
 
Method Summary
 void run()
          Mate the two chromosomes.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MateWorker

public MateWorker(Chromosome<GENE_TYPE> mother,
                  Chromosome<GENE_TYPE> father,
                  Chromosome<GENE_TYPE> child1,
                  Chromosome<GENE_TYPE> child2)
Parameters:
mother - The mother.
father - The father.
child1 - The first child.
child2 - The second child.
Method Detail

run

public void run()
Mate the two chromosomes.

Specified by:
run in interface java.lang.Runnable

The Encog Project