newPipeline: Converts a gene into a genetic operator pipeline (a function...

View source: R/xegaOperatorPipelines.R

newPipelineR Documentation

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

Description

The pipeline is evaluate(gene).

Usage

newPipeline(g, lF)

Arguments

g

A gene.

lF

The local function configuration.

Details

newPipeline is a constructor of a function closure which contains the evaluation of a gene.

Value

Closure of genetic operator pipeline without mutation and crossover. The argument of the closure lF configures the behavior of the pipeline.

See Also

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

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<-newPipeline(g, lFxegaGaGene)
print(a)
a(lFxegaGaGene)

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