diff options
author | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2018-07-11 22:19:56 +0200 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2018-07-11 22:19:56 +0200 |
commit | a0442ed58dee48a521ea053083ea967894507898 (patch) | |
tree | 241f3920c6a80d0bad494d3969ea98aabfef4b7d /numlib/dhsx.c | |
parent | f6b8e0eae4374f339487a33e3e4fe5462d5816e1 (diff) |
New upstream version 2.0.1+repackupstream/2.0.1+repackupstream
Diffstat (limited to 'numlib/dhsx.c')
-rwxr-xr-x | numlib/dhsx.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/numlib/dhsx.c b/numlib/dhsx.c index e9da0eb..aa9f462 100755 --- a/numlib/dhsx.c +++ b/numlib/dhsx.c @@ -20,7 +20,7 @@ #undef DEBUG -int dhsx_debug = 1; +int dhsx_debug = 0; static void simplexinit(int di, double *cp, double **p, double *r, double sv, int ii); static double trypoint(int di,double *cp, double **p, double *y, int hix, double hpfac, @@ -92,9 +92,15 @@ void *fdata /* Data needed by function */ lox = i; } tryy = (*funk)(fdata, cp); /* Value at initial point */ +#ifdef DEBUG + if (dhsx_debug) printf(" initial point %s = %e\n",debPdv(di,cp),tryy); +#endif /* DEBUG */ /* If our initial point is better than any of the simplex verticies */ if (y[lox] > tryy) { +#ifdef DEBUG + if (dhsx_debug) printf(" initial point is better than surrounding simplex\n"); +#endif /* DEBUG */ /* Move all the verticies to match moving lox to cp */ for (i = 0; i < nsp; i++) { if (i == lox) @@ -263,6 +269,9 @@ void *fdata /* Data needed by function */ for (j = 0; j < di; j++) cp[j] = p[lox][j]; } +#ifdef DEBUG + else if (dhsx_debug) printf("C point val %f is best\n",tryy); +#endif free_dvector(y2, 0, nsp-1); free_dmatrix(p2, 0, nsp-1, 0, di-1); free_dvector(y, 0, nsp-1); |