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:

  1. Crossover functions with two kids:

    1. "Cross2Gene" returns xegaGpAllCross2Gene().

    2. "AllCross2Gene" returns xegaGpAllCross2Gene().

    3. "FilterCross2Gene" returns xegaGpFilterCross2Gene().

  2. Crossover functions with one kid:

    1. "AllCrossGene" returns xegaGpAllCrossGene().

    2. "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]