|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jgap.impl.MutationOperator
org.jgap.impl.SwappingMutationOperator
Swaps the genes instead of mutating them. This kind of operator is required by Traveling Salesman Problem.
MutationOperator)Grefenstette, R. Gopal, R. Rosmaita, and D. Gucht.
Genetic algorithms for the traveling salesman problem.
In Proceedings of the Second International Conference on Genetic Algorithms.
Lawrence Eribaum Associates, Mahwah, NJ, 1985.
and also {@link http://ecsl.cs.unr.edu/docs/techreports/gong/node3.html
Sushil J. Louis & Gong Li },
Serialized Form| Constructor Summary | |
SwappingMutationOperator()
{@inheritDoc} |
|
SwappingMutationOperator(int a_desiredMutationRate)
{@inheritDoc} |
|
SwappingMutationOperator(IUniversalRateCalculator a_mutationRateCalculator)
{@inheritDoc} |
|
| Method Summary | |
int |
getStartOffset()
Gets a number of genes at the start of chromosome, that are excluded from the swapping. |
void |
operate(Population a_population,
java.util.List a_candidateChromosomes)
The operate method will be invoked on each of the genetic operators referenced by the current Configuration object during the evolution phase. Operators are given an opportunity to run in the order that they are added to the Configuration. Implementations of this method may reference the population of Chromosomes as it was at the beginning of the evolutionary phase and/or they may instead reference the candidate Chromosomes, which are the results of prior genetic operators. In either case, only Chromosomes added to the list of candidate chromosomes will be considered for natural selection. Implementations should never modify the original population, but should first make copies of the Chromosomes selected for modification and operate upon the copies. |
void |
setStartOffset(int a_offset)
Sets a number of genes at the start of chromosome, that are excluded from the swapping. |
| Methods inherited from class org.jgap.impl.MutationOperator |
getMutationRateCalc, setMutationRateCalc |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public SwappingMutationOperator()
public SwappingMutationOperator(IUniversalRateCalculator a_mutationRateCalculator)
public SwappingMutationOperator(int a_desiredMutationRate)
| Method Detail |
public void operate(Population a_population,
java.util.List a_candidateChromosomes)
operate in interface GeneticOperatoroperate in class MutationOperatora_population - The population of chromosomes from the current
evolution prior to exposure to any genetic operators.
Chromosomes in this array should never be modified.a_candidateChromosomes - The pool of chromosomes that are candidates
for the next evolved population. Only these
chromosomes will go to the natural
phase, so it's important to add any
modified copies of Chromosomes to this
list if it's desired for them to be
considered for natural selection.public void setStartOffset(int a_offset)
public int getStartOffset()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||