pga
Class GAGenome

java.lang.Object
  |
  +--pga.GAGenome
Direct Known Subclasses:
GATSPGenome

public abstract class GAGenome
extends java.lang.Object
implements java.lang.Cloneable

Abstraktni trida, od ktere se musi odvodit vsechny tridy genomu, ktere by mel GA vyuzivat


Field Summary
protected  int fitness
          Kvalita jedince
 
Constructor Summary
GAGenome()
           
 
Method Summary
abstract  java.lang.Object clone()
          Vytvori kopii objektu
abstract  GAGenome cloneGen()
          Vytvori kopii genomu
 void cross(GAGenome gen)
          Provede krizeni v nahodnych bodech a ohodnoti nove vznikleho jedince
 void cross(GAGenome gen, int point1, int point2)
          Provede krizeni v urcenych bodech a ohodnoti nove vznikleho jedince
protected abstract  void evaluate()
          Ohodnoti genom
abstract  int getCrossoverPoint()
          Vrati vhodny bod pro krizeni
 int getFitness()
          Vrati kvalitu jedince
protected abstract  void makeCrossover(GAGenome gen)
          Provede krizeni v nahodnych mistech
protected abstract  void makeCrossover(GAGenome gen, int point1, int point2)
          Provede krizeni v urcenych mistech
protected abstract  void makeMutation()
          Provede mutaci
 boolean mutate(int mutationRate)
          Provede mutaci genomu podle zadane pravdepodobnosti mutace
abstract  GAGenome newRandom()
          Vytvori novy, n8hodne zinicializovany genom
abstract  void randomize()
          Znahodni jiz vytvoreny genom
 java.lang.String toString(int point1, int point2)
          Vrati textovou reprezentaci genomu s vyznacenymi body krizeni
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

fitness

protected int fitness
Kvalita jedince

See Also:
evaluate()
Constructor Detail

GAGenome

public GAGenome()
Method Detail

cross

public void cross(GAGenome gen)
Provede krizeni v nahodnych bodech a ohodnoti nove vznikleho jedince

cross

public void cross(GAGenome gen,
                  int point1,
                  int point2)
Provede krizeni v urcenych bodech a ohodnoti nove vznikleho jedince

mutate

public boolean mutate(int mutationRate)
Provede mutaci genomu podle zadane pravdepodobnosti mutace

getFitness

public int getFitness()
Vrati kvalitu jedince

newRandom

public abstract GAGenome newRandom()
Vytvori novy, n8hodne zinicializovany genom

randomize

public abstract void randomize()
Znahodni jiz vytvoreny genom

evaluate

protected abstract void evaluate()
Ohodnoti genom

makeCrossover

protected abstract void makeCrossover(GAGenome gen)
Provede krizeni v nahodnych mistech

makeCrossover

protected abstract void makeCrossover(GAGenome gen,
                                      int point1,
                                      int point2)
Provede krizeni v urcenych mistech

makeMutation

protected abstract void makeMutation()
Provede mutaci

cloneGen

public abstract GAGenome cloneGen()
Vytvori kopii genomu

clone

public abstract java.lang.Object clone()
Vytvori kopii objektu
Overrides:
clone in class java.lang.Object

getCrossoverPoint

public abstract int getCrossoverPoint()
Vrati vhodny bod pro krizeni

toString

public java.lang.String toString(int point1,
                                 int point2)
Vrati textovou reprezentaci genomu s vyznacenymi body krizeni