|
JGAP | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.jgap.FitnessFunction
examples.distinctGenes.SampleFitnessFunction
public class SampleFitnessFunction
Fitness function for our example. It's without sense, it's just to demonstrate how to evaluate a chromosome with 40 4-field-genes and one 3-field gene. Each toplevel-gene is a CompositeGene, each "field" within a CompositeGene is a BooleanGene here (arbitrarily chosen).
| Field Summary |
|---|
| Fields inherited from class org.jgap.FitnessFunction |
|---|
DELTA, NO_FITNESS_VALUE |
| Constructor Summary | |
|---|---|
SampleFitnessFunction()
|
|
| Method Summary | |
|---|---|
double |
evaluate(IChromosome a_subject)
Calculate the fitness value of a Chromosome. |
| Methods inherited from class org.jgap.FitnessFunction |
|---|
clone, getFitnessValue, getLastComputedFitnessValue |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SampleFitnessFunction()
| Method Detail |
|---|
public double evaluate(IChromosome a_subject)
evaluate in class FitnessFunctiona_subject - the Chromosome to be evaluated
|
JGAP | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||