pga
Class GAStatistics

java.lang.Object
  |
  +--pga.GAStatistics

public class GAStatistics
extends java.lang.Object

GAStatistics - trida udrzujici statisticke udaje o behu GA.


Field Summary
protected  GAGenome BSF
          Nejlepsi nalezene reseni
protected  int generationOfBSF
          BSF nalezeno v generaci
protected  int nCrossovers
          Pocet krizeni
protected  int nMutations
          Pocet mutaci
 
Constructor Summary
GAStatistics()
           
 
Method Summary
 void clearStats()
          Vymaze statistiky
 GAGenome getBSF()
          Zjisti nejlepsi reseni
 int getCrossovers()
          Vrati pocet krizeni
 int getGenerationOfBSF()
          Zjisti generaci, ve ktere ho bylo dosazeno
 int getMutations()
          Vrati pocet mutaci
 void incCrossovers()
          Zvysi pocet krizeni o 1.
 void incMutations()
          Zvysi pocet mutaci o 1.
 boolean tryToSetBSF(GAGenome gen, int g)
          Nastav nejlepsi nalezene reseni
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

nMutations

protected int nMutations
Pocet mutaci

nCrossovers

protected int nCrossovers
Pocet krizeni

BSF

protected GAGenome BSF
Nejlepsi nalezene reseni

generationOfBSF

protected int generationOfBSF
BSF nalezeno v generaci
Constructor Detail

GAStatistics

public GAStatistics()
Method Detail

incMutations

public void incMutations()
Zvysi pocet mutaci o 1.

incCrossovers

public void incCrossovers()
Zvysi pocet krizeni o 1.

getMutations

public int getMutations()
Vrati pocet mutaci

getCrossovers

public int getCrossovers()
Vrati pocet krizeni

tryToSetBSF

public boolean tryToSetBSF(GAGenome gen,
                           int g)
Nastav nejlepsi nalezene reseni
Parameters:
gen - zjistovany genom
g - generace, ktera prave probiha

getBSF

public GAGenome getBSF()
Zjisti nejlepsi reseni

getGenerationOfBSF

public int getGenerationOfBSF()
Zjisti generaci, ve ktere ho bylo dosazeno

clearStats

public void clearStats()
Vymaze statistiky