RandomVectorGenerator rvg =
new UncorrelatedRandomVectorGenerator(new double[] { 0.9, 1.1 },
new double[] { 0.2, 0.2 },
new UniformRandomGenerator(rg));
optimum =
nm.minimize(rosenbrock, 100, new ValueChecker(1.0e-3), rvg);
assertEquals(0.0, optimum.getCost(), 2.0e-4);
optimum =
nm.minimize(rosenbrock, 100, new ValueChecker(1.0e-3), rvg, 3);
assertEquals(0.0, optimum.getCost(), 3.0e-5);