xegaGaMutationFactory {xegaGaGene} | R Documentation |
Configure the mutation function of a genetic algorithm.
Description
xegaGaMutationFactory
implements the selection
of one of the mutation functions in this
package 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:
"MutateGene" returns
xegaGaMutateGene
."IVMGene" returns
xegaGaIVAdaptiveMutateGene
.
Usage
xegaGaMutationFactory(method = "MutateGene")
Arguments
method |
A string specifying the mutation function. |
Value
A mutation function for genes.
See Also
Other Configuration:
lFxegaGaGene
,
xegaGaCrossoverFactory()
,
xegaGaGeneMapFactory()
,
xegaGaReplicationFactory()
Examples
parm<-function(x) {function() {return(x)}}
lFxegaGaGene$BitMutationRate1<-parm(1.0)
Mutate<-xegaGaMutationFactory("MutateGene")
gene1<-xegaGaInitGene(lFxegaGaGene)
gene1
Mutate(gene1, lFxegaGaGene)
[Package xegaGaGene version 1.0.0.1 Index]