revise package structure: always predict from 1am to horizon, dataset not cut at...
[talweg.git] / pkg / R / F_Zero.R
index 2c9a7b7..4e1ae11 100644 (file)
@@ -3,6 +3,8 @@
 #' Flat prediction: always forecast a serie of zeros.
 #' This serie is then adjusted using the ".pjump" function (see \code{Forecaster} class).
 #'
+#' @usage # ZeroForecaster$new(pjump)
+#'
 #' @docType class
 #' @format R6 class, inherits Forecaster
 #' @aliases F_Zero
@@ -11,7 +13,7 @@ ZeroForecaster = R6::R6Class("ZeroForecaster",
        inherit = Forecaster,
 
        public = list(
-               predictShape = function(data, today, memory, horizon, ...)
-                       rep(0, horizon)
+               predictShape = function(data, today, memory, predict_from, horizon, ...)
+                       rep(0, (horizon-predict_from+1))
        )
 )