// anneal.h typedef real (*annealcostpp)(void *A, void *B); typedef real (*annealtermpp)(void *A); typedef struct { short num; // number of nodes void **order, // [pointer to] an array of pointers to nodes **space; // extra room for re-arranging order long tries, // # of re-arrangements attempted at a given temperature oodles; // maximum succesful re-arrangements at a given temperature real temp; // current annealing temperature annealcostpp cost; // cost or "energy" of a link, e.g. distance annealtermpp endcost; // cost of end links } annealtask; void anneal(annealtask *T, annealcostpp Cost, annealtermpp EndCost);