119 RealVector x0(dim, 0.0);
120 for (
size_t j=0; j<dim; j++) x0 +=
m_simplex[j].point;
125 xr.point = 2.0 * x0 - worst.point;
126 xr.value = objectiveFunction(xr.point);
128 if (best.value <= xr.value && xr.value <
m_simplex[dim-1].value)
133 else if (xr.value < best.value)
137 xe.point = 3.0 * x0 - 2.0 * worst.point;
138 xe.value = objectiveFunction(xe.point);
140 if (xe.value < xr.value)
155 xc.point = 0.5 * x0 + 0.5 * worst.point;
156 xc.value = objectiveFunction(xc.point);
158 if (xc.value < worst.value)
166 for (
size_t j=1; j<=dim; j++)