xegaPermCrossoverFactory {xegaPermGene}R Documentation

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")

Arguments

method

A string specifying the crossover function.

Value

A crossover function for genes.

See Also

Other Configuration: lFxegaPermGene, xegaPermMutationFactory()

Examples

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

[Package xegaPermGene version 1.0.0.0 Index]