The Encog Project

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

java.lang.Object
  extended by org.encog.solve.genetic.MateWorker<GENE_TYPE>
All Implemented Interfaces:
java.util.concurrent.Callable<java.lang.Integer>

public class MateWorker<GENE_TYPE>
extends java.lang.Object
implements java.util.concurrent.Callable<java.lang.Integer>

MateWorker: 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
 java.lang.Integer call()
          Execute the background task.
 
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

call

public java.lang.Integer call()
                       throws java.lang.Exception
Execute the background task.

Specified by:
call in interface java.util.concurrent.Callable<java.lang.Integer>
Returns:
Not used, need to match prototype.
Throws:
java.lang.Exception - Something went wrong.

The Encog Project