xegaGaMutationFactory: Configure the mutation function of a genetic algorithm.

View source: R/xegaGaMutate.R

xegaGaMutationFactoryR Documentation

Configure the mutation function of a genetic algorithm.

Description

xegaGaMutationFactory() implements the selection of one of the mutation 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. "MutateGene" returns xegaGaMutateGene().

  2. "IVM" returns xegaGaIVAdaptiveMutateGene().

Usage

xegaGaMutationFactory(method = "MutateGene")

Arguments

method

A string specifying the mutation function.

Value

A mutation function for genes.

See Also

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

Examples

parm<-function(x) {function() {return(x)}}
lFxegaGaGene$BitMutationRate1<-parm(1.0)
Mutate<-xegaGaMutationFactory("MutateGene")
gene1<-xegaGaInitGene(lFxegaGaGene)
gene1
Mutate(gene1, lFxegaGaGene)

xegaGaGene documentation built on April 16, 2025, 5:11 p.m.