23 #define Fixed(a, b) ((a)->FixedTo1 == (b) || (a)->FixedTo2 == (b)) 24 #define FixedOrCommon(a, b) (Fixed(a, b) || IsCommonEdge(a, b)) 25 #define InBestTour(a, b) ((a)->BestSuc == (b) || (b)->BestSuc == (a)) 26 #define InNextBestTour(a, b)\ 27 ((a)->NextBestSuc == (b) || (b)->NextBestSuc == (a)) 28 #define InInputTour(a, b) ((a)->InputSuc == (b) || (b)->InputSuc == (a)) 29 #define InInitialTour(a, b)\ 30 ((a)->InitialSuc == (b) || (b)->InitialSuc == (a)) 32 ((a)->BestSuc ? InBestTour(a, b) : (a)->Dad == (b) || (b)->Dad == (a)) 34 #define Link(a, b) { ((a)->Suc = (b))->Pred = (a); } 36 { Link((b)->Pred, (b)->Suc); Link(b, b); Link(b, (a)->Suc); Link(a, b); } 37 #define Precede(a, b)\ 38 { Link((a)->Pred, (a)->Suc); Link(a, a); Link((b)->Pred, a); Link(a, b); } 39 #define SLink(a, b) { (a)->Suc = (b); (b)->Pred = (a); } 346 void eprintf(
const char *fmt, ...);
359 void ReadTour(
char * FileName, FILE ** File);
int D_EXPLICIT(Node *Na, Node *Nb)
int IsCandidate(const Node *ta, const Node *tb)
int fscanint(FILE *f, int *v)
int NonsequentialMoveType
double InitialTourFraction
void PrintStatistics(void)
int ExtraCandidateSetType
char * SubproblemTourFileName
int CandidateSetSymmetric
MoveFunction BestSubsequentMove
void PrintParameters(void)
void printff(char *fmt,...)
int Distance_MAN_2D(Node *Na, Node *Nb)
int Distance_GEOM_MEEUS(Node *Na, Node *Nb)
int c_GEOM_MEEUS(Node *Na, Node *Nb)
void WriteCandidates(void)
int Distance_SPECIAL(Node *Na, Node *Nb)
Candidate * BackboneCandidateSet
Node *(* MoveFunction)(Node *t1, Node *t2, GainType *G0, GainType *Gain)
int Distance_XRAY2(Node *Na, Node *Nb)
int SubproblemsCompressed
char * OutputTourFileName
int Distance_ATT(Node *Na, Node *Nb)
int Distance_ATSP(Node *Na, Node *Nb)
int c_CEIL_2D(Node *Na, Node *Nb)
void ReadParameters(void)
int C_EXPLICIT(Node *Na, Node *Nb)
int Distance_CEIL_3D(Node *Na, Node *Nb)
int Distance_XRAY1(Node *Na, Node *Nb)
int Distance_CEIL_2D(Node *Na, Node *Nb)
int Distance_1(Node *Na, Node *Nb)
void AllocateStructures(void)
int c_EUC_2D(Node *Na, Node *Nb)
void InitializeStatistics(void)
int c_EUC_3D(Node *Na, Node *Nb)
void eprintf(const char *fmt,...)
int c_GEOM(Node *Na, Node *Nb)
int Distance_GEOM(Node *Na, Node *Nb)
int c_CEIL_3D(Node *Na, Node *Nb)
int Distance_GEO_MEEUS(Node *Na, Node *Nb)
int Distance_EUC_2D(Node *Na, Node *Nb)
char * ReadLine(FILE *InputFile)
void ReadTour(char *FileName, FILE **File)
int Distance_MAX_3D(Node *Na, Node *Nb)
int Distance_MAX_2D(Node *Na, Node *Nb)
int Distance_MAN_3D(Node *Na, Node *Nb)
int SierpinskiPartitioning
int Distance_EUC_3D(Node *Na, Node *Nb)
int c_GEO(Node *Na, Node *Nb)
char ** MergeTourFileName
MoveFunction BacktrackMove
FILE * SubproblemTourFile
void WriteTour(char *FileName, int *Tour, GainType Cost)
int Distance_GEO(Node *Na, Node *Nb)
int C_FUNCTION(Node *Na, Node *Nb)
char * InitialTourFileName
int c_ATT(Node *Na, Node *Nb)
int c_GEO_MEEUS(Node *Na, Node *Nb)
void SRandom(unsigned seed)
char ** CandidateFileName
int ExtraCandidateSetSymmetric
void UpdateStatistics(GainType Cost, double Time)
int Distance_EXPLICIT(Node *Na, Node *Nb)
int(* CostFunction)(Node *Na, Node *Nb)
int D_FUNCTION(Node *Na, Node *Nb)