Concorde linkern.h functions
CClinkern_tour
File:
LINKERN/linkern.c
Header:
linkern.h
Prototype:
int CClinkern_tour (int ncount, CCdatagroup *dat, int ecount,
int *elist, int stallcount, int repeatcount, int *incycle,
int *outcycle, double *val
int silent, double time_bound, double length_bound,
char *saveit_name, int kicktype, CCrandstate *rstate)
Description:
RUNS Iterated Lin-Kernighan.
-ncount (the number of nodes int the graph)
-dat (coordinate dat)
-ecount (the number of good edges - should not be 0)
-elist (the good edges in end1 end2 format)
-stallcount (the max number of 4-swaps without progress
-repeatcount (the number of 4-swap kicks)
-incycle (a starting cycle, in node node node format - can be NULL)
-outcycle (returns the cycle - can be NULL)
-run_slightly (if nonzero, then very little info will be printed)
-time_bound (if postive, then the search will stop after the kick
that puts the running time above this number of seconds)
-length_bound (if postive, then the search will stop after the kick
that puts the tour at or below this length)
-saveit_name (if non NULL then the tour will be saved to this file
after every 10000 kicks - if it has improved)
-kicktype (specifies the type of kick used - should be one of
CC_LK_RANDOM_KICK, CC_LK_GEOMETRIC_KICK, or CC_LK_CLOSE_KICK)
NOTES: If incycle is NULL, then a random starting cycle is used. If
outcycle is not NULL, then it should point to an array of length
at least ncount.
CClinkern_flipper_init
File:
LINKERN/flip_two.c
Header:
linkern.h
Prototype:
int CClinkern_flipper_init (CClk_flipper *f, int ncount, int *cyc)
Description:
initializes flipper to an initial cycle given in cyc.
returns 0 on success, nonzero on failure.
CClinkern_flipper_cycle
File:
LINKERN/flip_two.c
Header:
linkern.h
Prototype:
void CClinkern_flipper_cycle (CClk_flipper *F, int *x)
Description:
places the current cycle in x.
CClinkern_flipper_finish
File:
LINKERN/flip_two.c
Header:
linkern.h
Prototype:
void CClinkern_flipper_finish (CClk_flipper *F)
Description:
frees up space allocated by CClinkern_flipper_init.
every CClinkern_flipper_init should lead to a
CClinkern_flipper_finish call.
CClinkern_flipper_next
File:
LINKERN/flip_two.c
Header:
linkern.h
Prototype:
int CClinkern_flipper_next (CClk_flipper *f, int x)
Description:
returns the successor to x in the current cycle.
CClinkern_flipper_prev
File:
LINKERN/flip_two.c
Header:
linkern.h
Prototype:
int CClinkern_flipper_prev (CClk_flipper *f, int x)
Description:
returns the predecessor of x in the current cycle.
CClinkern_flipper_flip
File:
LINKERN/flip_two.c
Header:
linkern.h
Prototype:
void CClinkern_flipper_flip (CClk_flipper *F, int x, int y)
Description:
flips the portion of the cycle from x to y (inclusive).
CClinkern_flipper_sequence
File:
LINKERN/flip_two.c
Header:
linkern.h
Prototype:
int CClinkern_flipper_sequence (CClk_flipper *f, int * x, int y,
int z)
Description:
returns 1 if xyz occur as an increasing subsequence of the cycle,
returns 0 otherwise.