public class LineCrossover<G extends NumericGene<?,G>,C extends Comparable<? super C>> extends Crossover<G,C>
Points outside of the allowed numeric range are rejected and the original
value are used instead. The strategy on how out-of-range points are handled,
is the difference to the very similar IntermediateCrossover.
IntermediateCrossover_probabilityDEFAULT_ALTER_PROBABILITY| Constructor and Description |
|---|
LineCrossover()
Creates a new linear-crossover with default recombination
probability (
Alterer.DEFAULT_ALTER_PROBABILITY) and a p value
of zero, which restricts the recombined chromosomes within the hypercube
of the selected chromosomes (vectors). |
LineCrossover(double probability)
Creates a new linear-crossover with the given recombination
probability.
|
LineCrossover(double probability,
double p)
Creates a new linear-crossover with the given recombination
probability and the line-scaling factor p.
|
| Modifier and Type | Method and Description |
|---|---|
protected int |
crossover(MSeq<G> v,
MSeq<G> w)
Template method which performs the crossover.
|
boolean |
equals(Object obj) |
int |
hashCode() |
String |
toString() |
alter, getOrdergetProbabilitypublic LineCrossover(double probability, double p)
probability - the recombination probability.p - defines the possible location of the recombined chromosomes. If
p = 0 then the children will be located along the line
within the hypercube between the two points. If p > 0
then the children may be located anywhere on the line, even
somewhat outside of the hypercube.IllegalArgumentException - if the probability is not in the
valid range of [0, 1] or if p is smaller then zeropublic LineCrossover(double probability)
probability - the recombination probability.IllegalArgumentException - if the probability is not in the
valid range of [0, 1]public LineCrossover()
Alterer.DEFAULT_ALTER_PROBABILITY) and a p value
of zero, which restricts the recombined chromosomes within the hypercube
of the selected chromosomes (vectors).protected int crossover(MSeq<G> v, MSeq<G> w)
Crossovercrossover in class Crossover<G extends NumericGene<?,G>,C extends Comparable<? super C>>v - the genes of the first chromosomew - the genes of the other chromosomepublic int hashCode()
hashCode in class AbstractAlterer<G extends NumericGene<?,G>,C extends Comparable<? super C>>public boolean equals(Object obj)
equals in class AbstractAlterer<G extends NumericGene<?,G>,C extends Comparable<? super C>>© 2007-2017 Franz Wilhelmstötter (2017-04-28 16:50)