- if (ncores > 1 && requireNamespace("parallel",quietly=TRUE))
- {
- p <- parallel::mclapply(seq_along(integer_indices), function(i) {
- list(
- "forecast" = forecaster$predictSerie(
- data, integer_indices[i], memory, horizon, ...),
- "params"= forecaster$getParameters(),
- "index" = integer_indices[i] )
- }, mc.cores=ncores)
- }
- else
+ if (!is.null(pjump))
+ pjump <- getFromNamespace(paste("get",pjump,"JumpPredict",sep=""), "talweg")
+ forecaster = forecaster_class_name$new(pjump)
+
+ computeOneForecast <- function(i)