View source: R/xegaGaCrossover.R
xegaGaCross2Gene | R Documentation |
xegaGaCross2Gene()
randomly determines a cut point.
It combines the bits before the cut point of the first gene
with the bits after the cut point from the second gene (kid 1).
It combines the bits before the cut point of the second gene
with the bits after the cut point from the first gene (kid 2).
It returns 2 genes.
xegaGaCross2Gene(gg1, gg2, lF)
gg1 |
A binary gene. |
gg2 |
A binary gene. |
lF |
The local configuration of the genetic algorithm. |
A list of 2 binary genes.
Other Crossover (Returns 2 Kids):
xegaGaUCross2Gene()
,
xegaGaUPCross2Gene()
gene1<-xegaGaInitGene(lFxegaGaGene)
gene2<-xegaGaInitGene(lFxegaGaGene)
xegaGaDecodeGene(gene1, lFxegaGaGene)
xegaGaDecodeGene(gene2, lFxegaGaGene)
newgenes<-xegaGaCross2Gene(gene1, gene2, lFxegaGaGene)
xegaGaDecodeGene(newgenes[[1]], lFxegaGaGene)
xegaGaDecodeGene(newgenes[[2]], lFxegaGaGene)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.