-#' @include Forecaster.R
+#' Zero Forecaster
#'
-#' @title Zero Forecaster
+#' Flat prediction: always forecast a serie of zeros (adjusted by 'pjump' function).
#'
-#' @description Return 0 (and then adjust). Inherits \code{\link{Forecaster}}
-ZeroForecaster = setRefClass(
- Class = "ZeroForecaster",
- contains = "Forecaster",
+#' @usage # ZeroForecaster$new(pjump)
+#'
+#' @docType class
+#' @format R6 class, inherits Forecaster
+#' @aliases F_Zero
+#'
+ZeroForecaster = R6::R6Class("ZeroForecaster",
+ inherit = Forecaster,
- methods = list(
- initialize = function(...)
- {
- callSuper(...)
- },
- predictShape = function(today, memory, horizon, ...)
- {
- rep(0., horizon)
- }
+ public = list(
+ predictShape = function(data, today, memory, predict_from, horizon, ...)
+ rep(0, (horizon-predict_from+1))
)
)