public double[] forecast(final int size) {
            double[] forecastData = new double[size];
            for (int i = 0 ; i < size ; i++) {
                forecastData[i] = levels[levels.length - 1] + (i + 1) * trends[trends.length - 1];
            }
            return forecastData;
        }
Forecasts future values.

@param size no of future values that you need to forecast

@return forecast data
src/main/java/eu/hansolo/tilesfx/tools/DoubleExponentialSmoothingForLinearSeries.java