char MaskPrecConts (nodeXtype n, nodeXtype *tour, signed char k, int *kval, nodeXtype *precConts, unsigned long int *precMaskBefore, unsigned long int *precMaskAfter, unsigned long int *cityLoc, costtype *servTime, costtype *shortMatrix) { int c,d,p; for (c=0; c0; p++) { for (c=cityLoc[precConts[p++]]; precConts[p]>0; p+=2) { d = cityLoc[precConts[p]]; if (d==c) { printf("How can city %d come before itself?!?!\n",precConts[p]); return(0); } else if (d>c) { if (d >= c + kval[c]) /* not feasible with k values */ { printf("Eeeek!\n");return(0); } else { precMaskAfter[c] += 1<<(d-c); } } else /* d d-k && c < d+k+k && //conditions for smINX to be valid shortMatrix[smINX(d,c,k)]