org.opensourcephysics.sip.ch14.genetic
Class GenePool

java.lang.Object
  extended by org.opensourcephysics.sip.ch14.genetic.GenePool
All Implemented Interfaces:
Drawable

public class GenePool
extends java.lang.Object
implements Drawable

GeneticApp carries out the evolution of a genetic algorithm.


Constructor Summary
GenePool()
           
 
Method Summary
 void copyGenotype(boolean[] a, boolean[] b)
           
 void draw(DrawingPanel panel, java.awt.Graphics g)
          Draws a representation of an object in a drawing panel.
 void evolve()
           
 void initialize(Phenotype phenotype)
           
 void mutate()
           
 void recombine()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GenePool

public GenePool()
Method Detail

initialize

public void initialize(Phenotype phenotype)

copyGenotype

public void copyGenotype(boolean[] a,
                         boolean[] b)

recombine

public void recombine()

mutate

public void mutate()

evolve

public void evolve()

draw

public void draw(DrawingPanel panel,
                 java.awt.Graphics g)
Description copied from interface: Drawable
Draws a representation of an object in a drawing panel.

Specified by:
draw in interface Drawable