newMutPipeline: Converts a gene into a genetic operator pipeline with...

View source: R/xegaOperatorPipelines.R

newMutPipelineR Documentation

Converts a gene into a genetic operator pipeline with mutation (a function closure).

Description

The pipeline is evaluate(accept(mutate, gene)).

Usage

newMutPipeline(g, lF)

Arguments

g

A gene.

lF

The local function configuration.

Value

Closure of genetic operator pipeline with mutation only. The argument of the closure lF configures the behavior of the pipeline.

See Also

Other Genetic Operator Pipelines: newCross2Mut1Pipeline(), newCross2Mut2Pipeline(), newCross2Pipeline(), newCrossMut2Pipeline(), newCrossMutPipeline(), newCrossPipeline(), newPipeline()

Examples

lFxegaGaGene$CrossGene<-xegaGaCrossGene
lFxegaGaGene$MutationRate<-function(fit, lF) {0.5}
lFxegaGaGene$CrossRate<-function(fit, lF) {0.5}
lFxegaGaGene$Accept<-function(OperatorPipeline, gene, lF) {gene}
g<-xegaGaInitGene(lFxegaGaGene)
a<-newMutPipeline(g, lFxegaGaGene)
print(a)
a(lFxegaGaGene)

xegaGaGene documentation built on Aug. 8, 2025, 6:30 p.m.