|
JGAP | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.jgap.FitnessFunction
org.jgap.impl.salesman.SalesmanFitnessFunction
public class SalesmanFitnessFunction
The fitness function to solve the Travelling Salesman problem. The function
returned by this method calls distance(Object from, Object to)
| Field Summary |
|---|
| Fields inherited from class org.jgap.FitnessFunction |
|---|
DELTA, NO_FITNESS_VALUE |
| Constructor Summary | |
|---|---|
SalesmanFitnessFunction(Salesman a_salesman)
|
|
| Method Summary | |
|---|---|
protected double |
evaluate(IChromosome a_subject)
Computes the distance by calling salesman Salesman.distance(org.jgap.Gene, org.jgap.Gene) |
| 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 SalesmanFitnessFunction(Salesman a_salesman)
| Method Detail |
|---|
protected double evaluate(IChromosome a_subject)
Salesman.distance(org.jgap.Gene, org.jgap.Gene)
evaluate in class FitnessFunctiona_subject - chromosome representing cities
|
JGAP | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||