xegaGaMutateGene: Mutate a gene.

View source: R/xegaGaMutate.R

xegaGaMutateGeneR Documentation

Mutate a gene.

Description

xegaGaMutateGene() mutates a binary gene. The per-bit mutation rate is given by lF$BitMutationRate1().

Usage

xegaGaMutateGene(gene, lF)

Arguments

gene

A binary gene.

lF

The local configuration of the genetic algorithm.

Value

A binary gene.

See Also

Other Mutation: xegaGaIVAdaptiveMutateGene()

Examples

parm<-function(x) {function() {return(x)}}
lFxegaGaGene$BitMutationRate1<-parm(1.0)
gene1<-xegaGaInitGene(lFxegaGaGene)
xegaGaDecodeGene(gene1, lFxegaGaGene)
lFxegaGaGene$BitMutationRate1()
gene<-xegaGaMutateGene(gene1, lFxegaGaGene)
xegaGaDecodeGene(gene, lFxegaGaGene)

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