Simplify plots: version OK with R6 classes
[talweg.git] / pkg / R / F_Zero.R
index 247ab04..4f57ba2 100644 (file)
@@ -1,20 +1,13 @@
 #' @include Forecaster.R
 #'
-#' @title Zero Forecaster
+#' Zero Forecaster
 #'
-#' @description Return 0 (and then adjust). Inherits \code{\link{Forecaster}}
-ZeroForecaster = setRefClass(
-       Class = "ZeroForecaster",
-       contains = "Forecaster",
+#' Return 0 (and then adjust). Inherits \code{\link{Forecaster}}
+ZeroForecaster = R6::R6Class("ZeroForecaster",
+       inherit = Forecaster,
 
-       methods = list(
-               initialize = function(...)
-               {
-                       callSuper(...)
-               },
-               predictShape = function(today, memory, horizon, ...)
-               {
+       public = list(
+               predictShape = function(data, today, memory, horizon, ...)
                        rep(0., horizon)
-               }
        )
 )