Learn R Programming

xegaGaGene (version 1.0.0.6)

xegaGaGeneMapFactory: Configure the gene map function of a genetic algorithm.

Description

xegaGaGeneMapFactory() implements the selection of one of the GeneMap 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. "Bin2Dec" returns xegaGaGeneMap(). (Default).

  2. "Gray2Dec" returns xegaGaGeneMapGray().

  3. "Identity" returns xegaGaGeneMapIdentity().

  4. "Permutation" returns xegaGaGeneMapPerm().

Usage

xegaGaGeneMapFactory(method = "Bin2Dec")

Value

A gene map function for genes.

Arguments

method

A string specifying the GeneMap function.

See Also

Other Configuration: lFxegaGaGene, xegaGaCrossoverFactory(), xegaGaMutationFactory(), xegaGaReplicationFactory()

Examples

Run this code
XGene<-xegaGaGeneMapFactory("Identity")
gene<-xegaGaInitGene(lFxegaGaGene)
XGene(gene$gene1, lFxegaGaGene$penv)

Run the code above in your browser using DataLab