Learn R Programming

xegaPermGene (version 1.0.0.1)

xegaPermCrossoverFactory: Configure the crossover function of a genetic algorithm.

Description

xegaPermCrossoverFactory 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 xegaPermCross2Gene.

  2. Crossover functions with one kid:

    1. "CrossGene" returns xegaPermCrossGene.

Usage

xegaPermCrossoverFactory(method = "Cross2Gene")

Value

A crossover function for genes.

Arguments

method

A string specifying the crossover function.

See Also

Other Configuration: lFxegaPermGene, xegaPermMutationFactory()

Examples

Run this code
XGene<-xegaPermCrossoverFactory("Cross2Gene")
gene1<-xegaPermInitGene(lFxegaPermGene)
gene2<-xegaPermInitGene(lFxegaPermGene)
XGene(gene1, gene2, lFxegaPermGene)

Run the code above in your browser using DataLab