@Test
public void constantDataGivesConstantInterpolatedResults() {

	double[] data = createConstantDataArray();
	for (int degree = 0; degree < 3; ++degree) {
		LoessInterpolator loess = new LoessInterpolator.Builder().setWidth(7).setDegree(degree).interpolate(data);
		for (int i = 0; i < 99; ++i) {
			double x = i + 0.5;
			Double y = loess.smoothOnePoint(x, 0, data.length - 1);
			assertNotNull(y);
			assertEquals(String.format("Bad value at %d", i), data[i], y, 2.0e-11);
		}
	}
}