newCross2Mut2Pipeline: Converts two genes into a pipeline with crossover (2 kids)...

View source: R/xegaOperatorPipelines.R

newCross2Mut2PipelineR Documentation

Converts two genes into a pipeline with crossover (2 kids) and mutation for second kid.

Description

The pipeline is evaluate(accept((crossover o mutation), gene, gene1)). Mutation is applied to the second kid.

Usage

newCross2Mut2Pipeline(g, g1, lF)

Arguments

g

A gene.

g1

A gene.

lF

The local function configuration.

Value

Closure of genetic operator pipeline with crossover with 2 kids and mutation on the second kid only. The argument of the closure lF configures the behavior of the pipeline.

See Also

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

Examples

lFxegaGaGene$CrossGene<-xegaGaCross2Gene
lFxegaGaGene$MutationRate<-function(fit, lF) {0.5}
lFxegaGaGene$CrossRate<-function(fit, lF) {0.5}
lFxegaGaGene$Accept<-function(OpPipeline, gene, lF) {OpPipeline(gene, lF)}
g<-xegaGaInitGene(lFxegaGaGene)
g1<-xegaGaInitGene(lFxegaGaGene)
a<-newCross2Mut1Pipeline(g, g1, lFxegaGaGene)
print(a)
a(lFxegaGaGene)

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