View source: R/xegaGaReplicate.R
xegaGaReplicationFactory | R Documentation |
xegaGaReplicationFactory()
implements the selection
of a replication method.
Current support:
"Kid1" returns xegaGaReplicateGene()
.
"Kid2" returns xegaGaReplicate2Gene()
.
xegaGaReplicationFactory(method = "Kid1")
method |
A string specifying the replication function. |
A replication function for genes.
Other Configuration:
lFxegaGaGene
,
xegaGaCrossoverFactory()
,
xegaGaGeneMapFactory()
,
xegaGaMutationFactory()
lFxegaGaGene$CrossGene<-xegaGaCrossGene
lFxegaGaGene$MutationRate<-function(fit, lF) {0.001}
lFxegaGaGene$Accept<-function(OperatorPipeline, gene, lF) {gene}
Replicate<-xegaGaReplicationFactory("Kid1")
pop10<-lapply(rep(0,10), function(x) xegaGaInitGene(lFxegaGaGene))
epop10<-lapply(pop10, lFxegaGaGene$EvalGene, lF=lFxegaGaGene)
fit10<-unlist(lapply(epop10, function(x) {x$fit}))
newgenes1<-Replicate(pop10, fit10, lFxegaGaGene)
lFxegaGaGene$CrossGene<-xegaGaCross2Gene
Replicate<-xegaGaReplicationFactory("Kid2")
newgenes2<-Replicate(pop10, fit10, lFxegaGaGene)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.