@Test
public void linearDataReturnsDataOnLine() {

	double[] data = createLinearDataArray();
	LoessInterpolator loess = new LoessInterpolator.Builder().setWidth(5).interpolate(data);
	for (int i = 0; i < data.length; ++i) {
		Double y = loess.smoothOnePoint(i, Math.max(0, i - 2), Math.min(i + 2, data.length - 1));
		assertNotNull(y);
		assertEquals(String.format("Bad value at %d", i), data[i], y, 1.0e-8);
	}
}