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!
wrapFunctionParallel(fun, cl = NULL, nCores = NULL)the function that shall be evaluated in parallel
Optional, an existing computation cluster
Optional, amount of cores to use for creating a new computation cluster. Default is all cores.
numeric vector, result of the parallelized evaluation