From a0442ed58dee48a521ea053083ea967894507898 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Frings-F=C3=BCrst?= Date: Wed, 11 Jul 2018 22:19:56 +0200 Subject: New upstream version 2.0.1+repack --- numlib/dhsx.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'numlib/dhsx.c') 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); -- cgit v1.2.3