xegaDfCrossoverFactory {xegaDfGene}R Documentation

Configure the crossover function of a genetic algorithm.

Description

xegaDfCrossoverFactory() 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 one kid:

  1. "CrossGene" returns CrossGene().

  2. "UCrossGene" returns UCrossGene(). Default.

  3. "UPCrossGene" returns UPCrossGene().

Usage

xegaDfCrossoverFactory(method = "UCrossGene")

Arguments

method

A string specifying the crossover function.

Details

All crossover operations return a 1 kid. This implies that some part of the genetic material is lost.

Value

Crossover function for genes.

See Also

Other Configuration: lFxegaDfGene, xegaDfGeneMapFactory(), xegaDfMutationFactory(), xegaDfReplicationFactory(), xegaDfScaleFactorFactory()

Examples

XGene<-xegaDfCrossoverFactory("UCrossGene")
gene1<-xegaDfInitGene(lFxegaDfGene)
gene2<-xegaDfInitGene(lFxegaDfGene)
XGene(gene1, gene2, lFxegaDfGene)

[Package xegaDfGene version 1.0.0.3 Index]