wrapFunctionParallel: Parallelized Function Evaluation Wrapper

View source: R/wrapper.R

wrapFunctionParallelR Documentation

Parallelized Function Evaluation Wrapper

Description

This is a simple wrapper that turns a function of type y=f(x), where x is a vector and y is a scalar, into a function that accepts and returns matrices, as required by spot. While doing so, the wrapper will use the parallel package in order to parallelize the execution of each function evaluation. This function will create a computation cluster if no cluster is specified and there is no default cluster setup!

Usage

wrapFunctionParallel(fun, cl = NULL, nCores = NULL)

Arguments

fun

the function that shall be evaluated in parallel

cl

Optional, an existing computation cluster

nCores

Optional, amount of cores to use for creating a new computation cluster. Default is all cores.

Value

numeric vector, result of the parallelized evaluation


SPOT documentation built on June 26, 2022, 1:06 a.m.