PparLapply {xegaPopulation}R Documentation

uses parLapply of library parallel for using workers on machines in a local network.

Description

uses parLapply of library parallel for using workers on machines in a local network.

Usage

PparLapply(pop, EvalGene, lF)

Arguments

pop

a population of genes.

EvalGene

the function for evaluating a gene.

lF

the local function factory which provides all functions needed in EvalGene.

Value

Fitness vector.

Warning

This section has not been properly tested. Random number generation? Examples?

See Also

Other Execution Model: MClapply(), futureLapply()

Examples

parm<-function(x) {function() {x}}
pop<-xegaInitPopulation(1000, lFxegaGaGene)
library(parallel)
clus<-makeCluster(spec=c("localhost", "localhost"), master="localhost", 
                            port=1250, homogeneous=TRUE)
lFxegaGaGene$cluster<-parm(clus)
popnew<-PparLapply(pop, lFxegaGaGene$EvalGene, lFxegaGaGene)
stopCluster(clus)


[Package xegaPopulation version 1.0.0.0 Index]