newCrossMutPipelineG: Converts a gene into a gene with embedded genetic operator...

View source: R/xegaOperatorPipelinesInGene.R

newCrossMutPipelineGR Documentation

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

Description

The embedded pipeline is evaluate(accept((crossover o mutation), gene, gene1)). The symbol o is short for mutation(crossover(gene, gene1)) in the accept function.

Usage

newCrossMutPipelineG(g, g1)

Arguments

g

A gene.

g1

A gene.

Value

A gene with embedded genetic operator pipeline with mutation and crossover. The argument lF of the function $Pipeline() configures the behavior of the pipeline.

See Also

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

Examples

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

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