public void testInterpolationInside()
throws DerivativeException {
double[] y = { 1.0, 3.0, -4.0 };
double[][] yDot = { { 1.0, 2.0, -2.0 } };
EulerStepInterpolator interpolator = new EulerStepInterpolator();
interpolator.reinitialize(new DummyEquations(), y, yDot, true);
interpolator.storeTime(0);
interpolator.shift();
interpolator.storeTime(1);
interpolator.setInterpolatedTime(0.1);
double[] result = interpolator.getInterpolatedState();
assertTrue(Math.abs(result[0] - 0.1) < 1.0e-10);
assertTrue(Math.abs(result[1] - 1.2) < 1.0e-10);
assertTrue(Math.abs(result[2] + 2.2) < 1.0e-10);
interpolator.setInterpolatedTime(0.5);
result = interpolator.getInterpolatedState();
assertTrue(Math.abs(result[0] - 0.5) < 1.0e-10);
assertTrue(Math.abs(result[1] - 2.0) < 1.0e-10);
assertTrue(Math.abs(result[2] + 3.0) < 1.0e-10);
}