xegaGpCrossoverFactory {xegaGpGene} | R Documentation |
Configure the crossover function of a grammar-based genetic algorithm.
Description
xegaGpCrossoverFactory()
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
xegaGpAllCross2Gene()
."AllCross2Gene" returns
xegaGpAllCross2Gene()
."FilterCross2Gene" returns
xegaGpFilterCross2Gene()
.
Crossover functions with one kid:
"AllCrossGene" returns
xegaGpAllCrossGene()
."FilterCrossGene" returns
xegaGpFilterCrossGene()
.
Usage
xegaGpCrossoverFactory(method = "Cross2Gene")
Arguments
method |
String specifying the crossover function. |
Value
Crossover function for genes.
See Also
Other Configuration:
xegaGpMutationFactory()
Examples
XGeneTwo<-xegaGpCrossoverFactory("Cross2Gene")
XGeneOne<-xegaGpCrossoverFactory("FilterCrossGene")
gene1<-xegaGpInitGene(lFxegaGpGene)
gene2<-xegaGpInitGene(lFxegaGpGene)
XGeneTwo(gene1, gene2, lFxegaGpGene)
XGeneOne(gene1, gene2, lFxegaGpGene)
[Package xegaGpGene version 1.0.0.0 Index]