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

View source: R/xegaOperatorPipelinesInGene.R

newCross2Mut1PipelineGR Documentation

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

Description

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

Usage

newCross2Mut1PipelineG(g, g1)

Arguments

g

A gene.

g1

A gene.

Value

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

See Also

Other Genetic Operator Pipelines in Gene: newCross2Mut2PipelineG(), newCross2PipelineG(), newCrossMut2PipelineG(), newCrossMutPipelineG(), newCrossPipelineG(), newMutPipelineG(), newPipelineG()

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<-newCross2Mut1PipelineG(g, g1)
print(a)
a$Pipeline(a, lFxegaGaGene)

xegaGaGene documentation built on Feb. 16, 2026, 5:11 p.m.