23 verts =
new Vec_DP*[nverts];
24 for (
int i=0; i<nverts; i++)
25 verts[i] =
new Vec_DP(dim);
30 for (
int i=0; i<nverts; i++)
38 double max = functionObject->f(*verts[0]);
40 for (
int i=1; i<nverts; i++) {
41 test = functionObject->f(*verts[i]);
55 double min = functionObject->f(*verts[0]);;
57 for (
int i=1; i<nverts; i++) {
58 test = functionObject->f(*verts[i]);
74 for (
int i=0; i<nverts; i++)
78 vec = ce / (nverts-1);
89 for (
int i=0; i<nverts; i++) {
90 dp =
dot(*verts[i]-ce, *verts[i]-ce);
102 *verts[hi] = ce + (ce - *verts[hi]);
112 *verts[hi] = ce + 2*(ce - *verts[hi]);
122 *verts[hi] = ce + 0.5*(*verts[hi] - ce);
130 for (
int i = 0; i<nverts; i++) {
132 *verts[i] = 0.5 * (*verts[i] + *verts[lo]);