HoltWintersOnlineComponents { public double getSeasonal(int seasonalIdx) { return seasonal[seasonalIdx]; } HoltWintersOnlineComponents(HoltWintersPointForecasterParams params); long getN(); double getSeasonal(int seasonalIdx); double[] getReverseHistorySeasonals(); void setSeasonal(int seasonalIdx, double seasonalValue, double observed); void addValue(double observed); double getSeasonalStandardDeviation(int seasonalIdx); int getCurrentSeasonalIndex();  }
@Test public void testConstructorNoInitSeasonalsMultiplicative() { final HoltWintersPointForecasterParams params = HoltWintersAustouristsTestHelper.buildAustouristsParams(HoltWintersSeasonalityType.MULTIPLICATIVE); HoltWintersOnlineComponents subject = new HoltWintersOnlineComponents(params); Assert.assertArrayEquals(HoltWintersAustouristsTestHelper.MULTIPLICATIVE_IDENTITY_SEASONALS, subject.getSeasonal(), TOLERANCE); }
@Test public void testConstructorNoInitSeasonalsAdditive() { final HoltWintersPointForecasterParams params = HoltWintersAustouristsTestHelper.buildAustouristsParams(HoltWintersSeasonalityType.ADDITIVE); HoltWintersOnlineComponents subject = new HoltWintersOnlineComponents(params); Assert.assertArrayEquals(HoltWintersAustouristsTestHelper.ADDITIVE_IDENTITY_SEASONALS, subject.getSeasonal(), TOLERANCE); }