|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object jenes.stage.AbstractStage<T> jenes.stage.operator.Operator<T> jenes.stage.operator.Crossover<T> jenes.stage.operator.common.OnePointCrossover<T>
T
- The class of chromosomes to work with.public class OnePointCrossover<T extends Chromosome>
A one-point crossover operator. It performes the simplest crossover algorithm according to a specified probability. It represents a 2-parents and 2-children crossover. A cross-point is randomly chosen and the genes are crossed.
Individual
,
Chromosome
Nested Class Summary |
---|
Nested classes/interfaces inherited from class jenes.stage.operator.Crossover |
---|
Crossover.Statistics |
Field Summary |
---|
Fields inherited from class jenes.stage.operator.Crossover |
---|
probability |
Fields inherited from class jenes.stage.operator.Operator |
---|
random, statistics |
Fields inherited from class jenes.stage.AbstractStage |
---|
biggerIsBetter, ga |
Constructor Summary | |
---|---|
OnePointCrossover(double probability)
Constructs a new one-point crossover with the specified probability |
Method Summary | |
---|---|
protected void |
cross(Individual<T>[] offsprings)
Executes the crossover. |
protected int |
spread()
Returns the number of individuals involved by this crossover operator |
Methods inherited from class jenes.stage.operator.Crossover |
---|
getProbability, init, process, setProbability |
Methods inherited from class jenes.stage.operator.Operator |
---|
getStatistics, updateStatistics |
Methods inherited from class jenes.stage.AbstractStage |
---|
dispose, isBiggerBetter, setBiggerIsBetter, setBiggerIsBetter |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public OnePointCrossover(double probability)
probability
- the crossover probabilityMethod Detail |
---|
protected int spread()
Crossover
spread
in class Crossover<T extends Chromosome>
protected void cross(Individual<T>[] offsprings)
Crossover
cross
in class Crossover<T extends Chromosome>
offsprings
- the individuals to be modified.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |