Package ga
Class Best
java.lang.Object
ga.Best
public class Best
extends java.lang.Object
stores the best fitness & mapping
-
Field Summary
Fields Modifier and Type Field Description private double
bestfitness
fitness for the above mappingprivate java.lang.String[]
bestphenotype
best mapping so far -
Constructor Summary
Constructors Constructor Description Best(int f)
-
Method Summary
Modifier and Type Method Description double
getbestfitness()
get best fitnessint[]
getbestphenotype()
get best solution (phenotype)void
setbestfitness(double newfit)
set best fitnessvoid
setbestphenotype(int[] ma)
set best solution (phenotype)Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Field Details
-
bestphenotype
private java.lang.String[] bestphenotypebest mapping so far -
bestfitness
private double bestfitnessfitness for the above mapping
-
-
Constructor Details
-
Best
public Best(int f)
-
-
Method Details
-
getbestfitness
public double getbestfitness()get best fitness -
setbestfitness
public void setbestfitness(double newfit)set best fitness -
getbestphenotype
public int[] getbestphenotype()get best solution (phenotype) -
setbestphenotype
public void setbestphenotype(int[] ma)set best solution (phenotype)
-