-#ifdef TSP_DIAGNOSTICS
- printf("during reduction, circuit is");
- for (k = 0; k < circuitlen; k++) {
- int nc = nodes[circuit[k]];
- printf(" (%d,%d,%d)", nc/DP1%w, nc/(DP1*w), nc%DP1);
- }
- printf("\n");
- printf("moves are ");
- x = nodes[circuit[0]] / DP1 % w;
- y = nodes[circuit[0]] / DP1 / w;
- for (k = 1; k < circuitlen; k++) {
- int x2, y2, dx, dy;
- if (nodes[circuit[k]] % DP1 != DIRECTIONS)
- continue;
- x2 = nodes[circuit[k]] / DP1 % w;
- y2 = nodes[circuit[k]] / DP1 / w;
- dx = (x2 > x ? +1 : x2 < x ? -1 : 0);
- dy = (y2 > y ? +1 : y2 < y ? -1 : 0);
- for (d = 0; d < DIRECTIONS; d++)
- if (DX(d) == dx && DY(d) == dy)
- printf("%c", "89632147"[d]);
- x = x2;
- y = y2;
- }
- printf("\n");
+ j = i;
+
+#ifndef TSP_DIAGNOSTICS
+ printf("during reduction, circuit is");
+ for (k = 0; k < circuitlen; k++) {
+ int nc = nodes[circuit[k]];
+ printf(" (%d,%d,%d)", nc/DP1%w, nc/(DP1*w), nc%DP1);
+ }
+ printf("\n");
+ printf("moves are ");
+ x = nodes[circuit[0]] / DP1 % w;
+ y = nodes[circuit[0]] / DP1 / w;
+ for (k = 1; k < circuitlen; k++) {
+ int x2, y2, dx, dy;
+ if (nodes[circuit[k]] % DP1 != DIRECTIONS)
+ continue;
+ x2 = nodes[circuit[k]] / DP1 % w;
+ y2 = nodes[circuit[k]] / DP1 / w;
+ dx = (x2 > x ? +1 : x2 < x ? -1 : 0);
+ dy = (y2 > y ? +1 : y2 < y ? -1 : 0);
+ for (d = 0; d < DIRECTIONS; d++)
+ if (DX(d) == dx && DY(d) == dy)
+ printf("%c", "89632147"[d]);
+ x = x2;
+ y = y2;
+ }
+ printf("\n");