assertEquals("Adams-Bashforth", integ.getName());
}
@Test
public void polynomial() throws DerivativeException, IntegratorException {
TestProblem6 pb = new TestProblem6();
double range = FastMath.abs(pb.getFinalTime() - pb.getInitialTime());
for (int nSteps = 1; nSteps < 8; ++nSteps) {
AdamsBashforthIntegrator integ =
new AdamsBashforthIntegrator(nSteps, 1.0e-6 * range, 0.1 * range, 1.0e-10, 1.0e-10);
TestProblemHandler handler = new TestProblemHandler(pb, integ);
integ.addStepHandler(handler);
integ.integrate(pb, pb.getInitialTime(), pb.getInitialState(),
pb.getFinalTime(), new double[pb.getDimension()]);
if (nSteps < 4) {
assertTrue(integ.getEvaluations() > 150);
} else {
assertTrue(integ.getEvaluations() < 70);
}