Learn R Programming

xegaGaGene (version 1.0.0.4)

xegaGaMutateGene: Mutate a gene.

Description

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

Usage

xegaGaMutateGene(gene, lF)

Value

A binary gene.

Arguments

gene

A binary gene.

lF

The local configuration of the genetic algorithm.

See Also

Other Mutation: xegaGaIVAdaptiveMutateGene()

Examples

Run this code
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)

Run the code above in your browser using DataLab