work on doc
[talweg.git] / pkg / R / F_Zero.R
index 247ab04..3c46f2c 100644 (file)
@@ -1,20 +1,15 @@
-#' @include Forecaster.R
+#' Zero Forecaster
 #'
-#' @title Zero Forecaster
+#' Flat prediction of next series of 'horizon' values.
 #'
-#' @description Return 0 (and then adjust). Inherits \code{\link{Forecaster}}
-ZeroForecaster = setRefClass(
-       Class = "ZeroForecaster",
-       contains = "Forecaster",
+#' @format R6 class, inherits Forecaster
+#' @alias 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, horizon, ...)
+                       rep(0, horizon)
        )
 )