Learn R Programming

xegaGaGene (version 1.0.0.6)

newMutPipelineG: Converts a gene into a genetic operator pipeline embedded in a gene with mutation.

Description

The embedded pipeline is evaluate(accept(mutate, gene)).

Usage

newMutPipelineG(g)

Value

A gene with embedded genetic operator pipeline with mutation only. The argument lF of the function $Pipeline

configures the behavior of the pipeline.

Arguments

g

A gene.

See Also

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

Examples

Run this code
lFxegaGaGene$MutationRate<-function(fit, lF) {0.5}
lFxegaGaGene$BitMutationRate1<-function(fit, lF) {0.5}
lFxegaGaGene$CrossRate<-function(fit, lF) {0.5}
lFxegaGaGene$Accept<-function(OperatorPipeline, gene, lF) {OperatorPipeline(gene, lF)}
g<-xegaGaInitGene(lFxegaGaGene)
print((lFxegaGaGene$EvalGene(g, lFxegaGaGene))$gene1)
a<-newMutPipelineG(g)
print(a)
b<-a$Pipeline(a, lFxegaGaGene)

Run the code above in your browser using DataLab