View source: R/xegaGaCrossover.R
xegaGaCrossoverFactory | R Documentation |
xegaGaCrossoverFactory()
implements the selection
of one of the crossover functions in this
package by specifying a text string.
The selection fails ungracefully (produces
a runtime error) if the label does not match.
The functions are specified locally.
Current support:
Crossover functions with two kids:
"Cross2Gene" returns xegaGaCross2Gene()
.
"UCross2Gene" returns xegaGaUCross2Gene()
.
"UPCross2Gene" returns xegaGaUPCross2Gene()
.
Crossover functions with one kid:
"CrossGene" returns xegaGaCrossGene()
.
"UCrossGene" returns xegaGaUCrossGene()
.
"UPCrossGene" returns xegaGaUPCrossGene()
.
xegaGaCrossoverFactory(method = "Cross2Gene")
method |
A string specifying the crossover function. |
Crossover operations which return 2 kids preserve the genetic material in the population. However, because we work with fixed size populations, genes with 2 offsprings fill two slots in the new population with their genetic material.
A crossover function for genes.
Other Configuration:
lFxegaGaGene
,
xegaGaGeneMapFactory()
,
xegaGaMutationFactory()
,
xegaGaReplicationFactory()
XGene<-xegaGaCrossoverFactory("Cross2Gene")
gene1<-xegaGaInitGene(lFxegaGaGene)
gene2<-xegaGaInitGene(lFxegaGaGene)
XGene(gene1, gene2, lFxegaGaGene)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.