xegaGeDecodeGeneFactory: Configure the decoder function of a genetic algorithm.

View source: R/xegaGeDecode.R

xegaGeDecodeGeneFactoryR Documentation

Configure the decoder function of a genetic algorithm.

Description

xegaGeDecodeGeneFactory() implements the selection of one of a decoder function by specifying a text string. The selection fails ungracefully (produces a runtime error) if the label does not match. The functions are specified locally.

Current support:

  1. "DecodeGene" returns xegaGeDecodeGene(). (Default).

  2. "DecodeGeneDT" returns xegaGeDecodeGeneDT(). This decoder does not guarantee complete programs.

Usage

xegaGeDecodeGeneFactory(method = "DecodeGene")

Arguments

method

A string specifying a decoder for genes

Value

A decoder for genes.

See Also

Other Configuration: xegaGeGeneMapFactory(), xegaGePrecisionFactory()

Examples

lFxegaGeGene$GeneMap<-xegaGeGeneMapFactory("Mod")
gene<-xegaGeInitGene(lFxegaGeGene)
DecodeGene<-xegaGeDecodeGeneFactory("DecodeGene")
DecodeGene(gene, lFxegaGeGene)
DecodeGeneDT<-xegaGeDecodeGeneFactory("DecodeGeneDT")
DecodeGeneDT(gene, lFxegaGeGene)

xegaGeGene documentation built on June 8, 2025, 1:09 p.m.