MClapplyHet {xegaPopulation}R Documentation

MultiCore apply of library parallel for heterogenous tasks.

Description

The evaluation of the fitness of the genes of the population is distributed to one worker on each core of the CPU of the local machine. The package parallel of base R is used. The number of cores is provided by lF$Cores.

Usage

MClapplyHet(pop, EvalGene, lF)

Arguments

pop

Population of genes.

EvalGene

Function for evaluating a gene.

lF

Local function configuration which provides all functions needed in EvalGene().

Details

Be aware that

Value

Fitness vector.

See Also

Other Execution Model: MClapply(), PparLapply(), PparLapplyHet(), futureLapply(), futureLapplyHet()

Examples

library(parallelly) 
if (supportsMulticore()){
lFxegaGaGene$Cores<-function() {2}
pop<-xegaInitPopulation(10, lFxegaGaGene)
popnew<-MClapplyHet(pop, lFxegaGaGene$EvalGene, lFxegaGaGene)
}


[Package xegaPopulation version 1.0.0.7 Index]