Learn R Programming

xegaGaGene (version 1.0.0.4)

newCrossMut2Pipeline: Converts two genes into a pipeline with crossover and mutation for both kids.

Description

The pipeline is evaluate(accept((crossover o mutation), gene, gene1)). Mutation is applied to both kids.

Usage

newCrossMut2Pipeline(g, g1, lF)

Value

Closure of genetic operator pipeline with crossover with two kids and mutation on both kids. The argument of the closure lF

configures the behavior of the pipeline.

Arguments

g

A gene.

g1

A gene.

lF

The local function configuration.

See Also

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

Examples

Run this code
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<-newCrossMut2Pipeline(g, g1, lFxegaGaGene)
print(a)
a(lFxegaGaGene)

Run the code above in your browser using DataLab