|
Data Structures |
struct | CC_SFILE |
struct | CC_SPORT |
struct | CCrandstate |
struct | CCbigchunkptr |
struct | CCptrworld |
struct | CCdheap |
struct | CCelist |
struct | CCelistl |
struct | CCelistw |
struct | CCelistlw |
struct | CCdata_user |
struct | CCdata_rhvector |
struct | CCdatagroup |
struct | CCutil_edgeinf |
struct | CCutil_edgehash |
struct | CCgenhash |
struct | CCgenhash_iter |
struct | CCpriority |
union | CCpriority::CCpri_data |
struct | CCsubdiv |
struct | CCsubdiv_lkh |
struct | CCutil_timer |
Defines |
#define | CCutil_MAXDOUBLE (1e30) |
#define | CCutil_MAXINT (2147483647) |
#define | CCcheck_rval(rval, msg) |
#define | CCcheck_NULL(item, msg) |
#define | CC_SBUFFER_SIZE (4000) |
#define | CC_SFNAME_SIZE (32) |
#define | CC_SAFE_MALLOC(nnum, type) (type *) CCutil_allocrus (((size_t) (nnum)) * sizeof (type)) |
#define | CC_FREE(object, type) |
#define | CC_IFFREE(object, type) |
#define | CC_PTRWORLD_ALLOC_ROUTINE(type, ptr_alloc_r, ptr_bulkalloc_r) |
#define | CC_PTRWORLD_FREE_ROUTINE(type, ptr_free_r) |
#define | CC_PTRWORLD_LISTADD_ROUTINE(type, entrytype, ptr_listadd_r, ptr_alloc_r) |
#define | CC_PTRWORLD_LISTFREE_ROUTINE(type, ptr_listfree_r, ptr_free_r) |
#define | CC_PTRWORLD_LEAKS_ROUTINE(type, ptr_leaks_r, field, fieldtype) |
#define | CC_PTRWORLD_ROUTINES(type, ptr_alloc_r, ptr_bulkalloc_r, ptr_free_r) |
#define | CC_PTRWORLD_LIST_ROUTINES(type, entrytype, ptr_alloc_r, ptr_bulkalloc_r, ptr_free_r, ptr_listadd_r, ptr_listfree_r) |
#define | CC_BIGCHUNK ((int) ((1<<16) - sizeof (CCbigchunkptr) - 16)) |
#define | CC_BIX_GETOPT_UNKNOWN -3038 |
#define | CC_KD_NORM_TYPE 128 |
#define | CC_X_NORM_TYPE 256 |
#define | CC_JUNK_NORM_TYPE 512 |
#define | CC_D2_NORM_SIZE 1024 |
#define | CC_D3_NORM_SIZE 2048 |
#define | CC_MATRIX_NORM_SIZE 4096 |
#define | CC_NORM_BITS |
#define | CC_NORM_SIZE_BITS |
#define | CC_MAXNORM (0 | CC_KD_NORM_TYPE | CC_D2_NORM_SIZE) |
#define | CC_EUCLIDEAN_CEIL (1 | CC_KD_NORM_TYPE | CC_D2_NORM_SIZE) |
#define | CC_EUCLIDEAN (2 | CC_KD_NORM_TYPE | CC_D2_NORM_SIZE) |
#define | CC_EUCLIDEAN_3D (3 | CC_X_NORM_TYPE | CC_D3_NORM_SIZE) |
#define | CC_USER (4 | CC_JUNK_NORM_TYPE | 0) |
#define | CC_ATT (5 | CC_X_NORM_TYPE | CC_D2_NORM_SIZE) |
#define | CC_GEOGRAPHIC (6 | CC_X_NORM_TYPE | CC_D2_NORM_SIZE) |
#define | CC_MATRIXNORM (7 | CC_JUNK_NORM_TYPE | CC_MATRIX_NORM_SIZE) |
#define | CC_DSJRANDNORM (8 | CC_JUNK_NORM_TYPE | 0) |
#define | CC_CRYSTAL (9 | CC_X_NORM_TYPE | CC_D3_NORM_SIZE) |
#define | CC_SPARSE (10 | CC_JUNK_NORM_TYPE | 0) |
#define | CC_RHMAP1 (11 | CC_JUNK_NORM_TYPE | 0) |
#define | CC_RHMAP2 (12 | CC_JUNK_NORM_TYPE | 0) |
#define | CC_RHMAP3 (13 | CC_JUNK_NORM_TYPE | 0) |
#define | CC_RHMAP4 (14 | CC_JUNK_NORM_TYPE | 0) |
#define | CC_RHMAP5 (15 | CC_JUNK_NORM_TYPE | 0) |
#define | CC_EUCTOROIDAL (16 | CC_JUNK_NORM_TYPE | CC_D2_NORM_SIZE) |
#define | CC_GEOM (17 | CC_X_NORM_TYPE | CC_D2_NORM_SIZE) |
#define | CC_MANNORM (18 | CC_KD_NORM_TYPE | CC_D2_NORM_SIZE) |
#define | CC_SUBDIVISION (99 | CC_JUNK_NORM_TYPE | 0) |
#define | CC_GEOGRAPHIC_SCALE (6378.388 * 3.14 / 180.0) |
#define | CC_GEOM_SCALE (6378388.0 * 3.14 / 180.0) |
#define | CC_ATT_SCALE (.31622) |
#define | CC_MASTER_NO_DAT 100 |
#define | CC_MASTER_DAT 101 |
#define | CCutil_SIGHUP 1 |
#define | CCutil_SIGINT 2 |
#define | CCutil_SIGQUIT 3 |
#define | CCutil_SIGILL 4 |
#define | CCutil_SIGTRAP 5 |
#define | CCutil_SIGABRT 6 |
#define | CCutil_SIGEMT 7 |
#define | CCutil_SIGFPE 8 |
#define | CCutil_SIGKILL 9 |
#define | CCutil_SIGBUS 10 |
#define | CCutil_SIGSEGV 11 |
#define | CCutil_SIGSYS 12 |
#define | CCutil_SIGPIPE 13 |
#define | CCutil_SIGALRM 14 |
#define | CCutil_SIGTERM 15 |
#define | CCutil_SIGUSR1 16 |
#define | CCutil_SIGUSR2 17 |
#define | CCutil_SIGCHLD 18 |
#define | CCutil_SIGPWR 19 |
#define | CCutil_SIGWINCH 20 |
#define | CCutil_SIGURG 21 |
#define | CCutil_SIGIO 22 |
#define | CCutil_SIGSTOP 23 |
#define | CCutil_SIGTSTP 24 |
#define | CCutil_SIGCONT 25 |
#define | CCutil_SIGTTIN 26 |
#define | CCutil_SIGTTOU 27 |
#define | CCutil_SIGVTALRM 28 |
#define | CCutil_SIGPROF 29 |
#define | CCutil_SIGXCPU 30 |
#define | CCutil_SIGXFSZ 31 |
#define | CCutil_SIGSTKFLT 32 |
#define | CCutil_SIGIOT 33 |
#define | CCutil_SIGPOLL 34 |
#define | CCutil_SIGMSG 35 |
#define | CCutil_SIGDANGER 36 |
#define | CCutil_SIGMIGRATE 37 |
#define | CCutil_SIGPRE 38 |
#define | CCutil_SIGVIRT 39 |
#define | CCutil_MAXSIG 39 |
#define | CC_SUBDIV_PORT ((unsigned short) 32141) |
#define | CC_SUBGATE_PORT ((unsigned short) 32143) |
#define | CCutil_FILE_NAME_LEN (128) |
#define | CC_PRANDMAX 1000000007 |
Typedefs |
typedef CC_SFILE | CC_SFILE |
typedef CC_SPORT | CC_SPORT |
typedef CCrandstate | CCrandstate |
typedef CCbigchunkptr | CCbigchunkptr |
typedef CCptrworld | CCptrworld |
typedef CCdheap | CCdheap |
typedef CCelist | CCelist |
typedef CCelistl | CCelistl |
typedef CCelistw | CCelistw |
typedef CCelistlw | CCelistlw |
typedef CCdata_user | CCdata_user |
typedef CCdata_rhvector | CCdata_rhvector |
typedef CCdatagroup | CCdatagroup |
typedef CCutil_edgeinf | CCutil_edgeinf |
typedef CCutil_edgehash | CCutil_edgehash |
typedef CCgenhash | CCgenhash |
typedef CCgenhash_iter | CCgenhash_iter |
typedef CCpriority | CCpriority |
typedef void(* | CCutil_handler )(int signum) |
typedef CCsubdiv | CCsubdiv |
typedef CCsubdiv_lkh | CCsubdiv_lkh |
typedef CCutil_timer | CCutil_timer |
Functions |
void * | CCutil_allocrus (size_t size) |
void ** | CCutil_reallocrus (void *ptr, size_t size) |
void ** | CCutil_freerus (void *p) |
void ** | CCutil_bigchunkfree (CCbigchunkptr *bp) |
void ** | CCptrworld_init (CCptrworld *world) |
void ** | CCptrworld_add (CCptrworld *world) |
void ** | CCptrworld_delete (CCptrworld *world) |
int | CCutil_reallocrus_scale (void **pptr, int *pnnum, int count, double scale, size_t size) |
int | CCutil_reallocrus_count (void **pptr, int count, size_t size) |
CCbigchunkptr * | CCutil_bigchunkalloc (void) |
int | CCutil_bix_getopt (int argc, char **argv, const char *def, int *p_optind, char **p_optarg) |
void | CCutil_dheap_free (CCdheap *h) |
void | CCutil_dheap_delete (CCdheap *h, int i) |
void | CCutil_dheap_changekey (CCdheap *h, int i, double newkey) |
int | CCutil_dheap_init (CCdheap *h, int k) |
int | CCutil_dheap_resize (CCdheap *h, int newsize) |
int | CCutil_dheap_findmin (CCdheap *h) |
int | CCutil_dheap_deletemin (CCdheap *h) |
int | CCutil_dheap_insert (CCdheap *h, int i) |
void | CCelist_init (CCelist *elist) |
void | CCelistl_init (CCelistl *elist) |
void | CCelistw_init (CCelistw *elist) |
void | CCelistlw_init (CCelistlw *elist) |
void | CCelist_free (CCelist *elist) |
void | CCelistl_free (CCelistl *elist) |
void | CCelistw_free (CCelistw *elist) |
void | CCelistlw_free (CCelistlw *elist) |
int | CCelist_alloc (CCelist *elist, int ecount) |
int | CCelistl_alloc (CCelistl *elist, int ecount) |
int | CCelistw_alloc (CCelistw *elist, int ecount) |
int | CCelistlw_alloc (CCelistlw *elist, int ecount) |
int | CCutil_edge_to_cycle (int ncount, int *elist, int *yesno, int *cyc) |
int | CCutil_dat_edgelen (int i, int j, CCdatagroup *dat) |
int | CCutil_dat_setnorm (CCdatagroup *dat, int norm) |
void | CCutil_dat_getnorm (CCdatagroup *dat, int *norm) |
void | CCutil_dsjrand_init (CCdatagroup *dat, int maxdist, int seed) |
void | CCutil_init_datagroup (CCdatagroup *dat) |
void | CCutil_freedatagroup (CCdatagroup *dat) |
int | CCutil_edgehash_init (CCutil_edgehash *h, int size) |
int | CCutil_edgehash_add (CCutil_edgehash *h, int end1, int end2, int val) |
int | CCutil_edgehash_set (CCutil_edgehash *h, int end1, int end2, int val) |
int | CCutil_edgehash_del (CCutil_edgehash *h, int end1, int end2) |
int | CCutil_edgehash_find (CCutil_edgehash *h, int end1, int end2, int *val) |
int | CCutil_edgehash_getall (CCutil_edgehash *h, int *ecount, int **elist, int **elen) |
void | CCutil_edgehash_delall (CCutil_edgehash *h) |
void | CCutil_edgehash_free (CCutil_edgehash *h) |
int | CCutil_edge_file_union (int ncount, int nfiles, char **flist, int *ecount, int **elist, int **elen, int *foundtour, double *besttourlen) |
int | CCutil_readint (FILE *f) |
int | CCutil_genhash_init (CCgenhash *h, int size, int(*hcmp)(void *key1, void *key2, void *u_data), unsigned int(*hfunc)(void *key, void *u_data), void *u_data, double maxdensity, double lowdensity) |
int | CCutil_genhash_insert (CCgenhash *h, void *key, void *data) |
int | CCutil_genhash_insert_h (CCgenhash *h, unsigned int hashval, void *key, void *data) |
int | CCutil_genhash_replace (CCgenhash *h, void *key, void *data) |
int | CCutil_genhash_replace_h (CCgenhash *h, unsigned int hashval, void *key, void *data) |
int | CCutil_genhash_delete (CCgenhash *h, void *key) |
int | CCutil_genhash_delete_h (CCgenhash *h, unsigned int hashval, void *key) |
unsigned int | CCutil_genhash_hash (CCgenhash *h, void *key) |
void * | CCutil_genhash_lookup (CCgenhash *h, void *key) |
void ** | CCutil_genhash_lookup_h (CCgenhash *h, unsigned int hashval, void *key) |
void *** | CCutil_genhash_next (CCgenhash *h, CCgenhash_iter *iter, void **key, int *keysize) |
void | CCutil_genhash_u_data (CCgenhash *h, void *u_data) |
void | CCutil_genhash_free (CCgenhash *h, void(*freefunc)(void *key, void *data, void *u_data)) |
void | CCutil_genhash_start (CCgenhash *h, CCgenhash_iter *iter) |
void | CCutil_cycle_len (int ncount, CCdatagroup *dat, int *cycle, double *len) |
int | CCutil_getdata (char *datname, int binary_in, int innorm, int *ncount, CCdatagroup *dat, int gridsize, int allow_dups, CCrandstate *rstate) |
int | CCutil_writedata (char *datname, int binary_out, int ncount, CCdatagroup *dat) |
int | CCutil_putmaster (char *mastername, int ncount, CCdatagroup *dat, int *perm) |
int | CCutil_writemaster (CC_SFILE *out, int ncount, CCdatagroup *dat, int *perm) |
int | CCutil_getmaster (char *mastername, int *ncount, CCdatagroup *dat, int **perm) |
int | CCutil_readmaster (CC_SFILE *in, int *ncount, CCdatagroup *dat, int **perm) |
int | CCutil_getnodeweights (char *weightname, int ncount, int weight_limit, double **wcoord, CCrandstate *rstate) |
int | CCutil_gettsplib (char *datname, int *ncount, CCdatagroup *dat) |
int | CCutil_writetsplib (const char *fname, int ncount, CCdatagroup *dat) |
int | CCutil_datagroup_perm (int ncount, CCdatagroup *dat, int *perm) |
int | CCutil_copy_datagroup (int ncount, CCdatagroup *indat, CCdatagroup *outdat) |
int | CCutil_getedgelist (int ncount, char *fname, int *ecount, int **elist, int **elen, int binary_in) |
int | CCutil_getedgelist_n (int *ncount, char *fname, int *ecount, int **elist, int **elen, int binary_in) |
int | CCutil_genedgelist (int ncount, int ecount, int **elist, int **elen, CCdatagroup *dat, int maxlen, CCrandstate *rstate) |
int | CCutil_getcycle_tsplib (int ncount, char *cyclename, int *outcycle) |
int | CCutil_getcycle_edgelist (int ncount, char *cyclename, int *outcycle, int binary_in) |
int | CCutil_getcycle (int ncount, char *cyclename, int *outcycle, int binary_in) |
int | CCutil_getedges_double (int *ncount, char *fname, int *ecount, int **elist, double **elen, int binary_in) |
int | CCutil_writeedges (int ncount, char *outedgename, int ecount, int *elist, CCdatagroup *dat, int binary_out) |
int | CCutil_writecycle_edgelist (int ncount, char *outedgename, int *cycle, CCdatagroup *dat, int binary_out) |
int | CCutil_writecycle (int ncount, char *outcyclename, int *cycle, int binary_out) |
int | CCutil_writeedges_int (int ncount, char *outedgename, int ecount, int *elist, int *elen, int binary_out) |
int | CCutil_writeedges_double (int ncount, char *outedgename, int ecount, int *elist, double *elen, int binary_out) |
int | CCutil_tri2dat (int ncount, int *elen, CCdatagroup *dat) |
int | CCutil_graph2dat_matrix (int ncount, int ecount, int *elist, int *elen, int defaultlen, CCdatagroup *dat) |
int | CCutil_graph2dat_sparse (int ncount, int ecount, int *elist, int *elen, int defaultlen, CCdatagroup *dat) |
int | CCutil_get_sparse_dat_edges (int ncount, CCdatagroup *dat, int *ecount, int **elist, int **elen) |
int | CCutil_sparse_strip_edges (CCdatagroup *dat, int in_ecount, int *in_elist, int *in_elen, int *ecount, int **elist, int **elen) |
int | CCutil_sparse_real_tour (int ncount, CCdatagroup *dat, int *cyc, int *yesno) |
void | CCutil_priority_free (CCpriority *pri) |
void | CCutil_priority_delete (CCpriority *pri, int handle) |
void | CCutil_priority_changekey (CCpriority *pri, int handle, double newkey) |
void * | CCutil_priority_findmin (CCpriority *pri, double *keyval) |
void ** | CCutil_priority_deletemin (CCpriority *pri, double *keyval) |
int | CCutil_priority_init (CCpriority *pri, int k) |
int | CCutil_priority_insert (CCpriority *pri, void *data, double keyval) |
CC_SFILE * | CCutil_sopen (const char *f, const char *s) |
CC_SFILE ** | CCutil_sdopen (int d, const char *s) |
int | CCutil_swrite (CC_SFILE *f, char *buf, int size) |
int | CCutil_swrite_bits (CC_SFILE *f, int x, int xbits) |
int | CCutil_swrite_ubits (CC_SFILE *f, unsigned int x, int xbits) |
int | CCutil_swrite_char (CC_SFILE *f, int x) |
int | CCutil_swrite_string (CC_SFILE *f, const char *x) |
int | CCutil_swrite_short (CC_SFILE *f, short x) |
int | CCutil_swrite_ushort (CC_SFILE *f, unsigned x) |
int | CCutil_swrite_int (CC_SFILE *f, int x) |
int | CCutil_swrite_uint (CC_SFILE *f, unsigned int x) |
int | CCutil_swrite_double (CC_SFILE *f, double x) |
int | CCutil_sread (CC_SFILE *f, char *buf, int size) |
int | CCutil_sread_bits (CC_SFILE *f, int *x, int xbits) |
int | CCutil_sread_ubits (CC_SFILE *f, unsigned int *x, int xbits) |
int | CCutil_sread_char (CC_SFILE *f, char *x) |
int | CCutil_sread_string (CC_SFILE *f, char *x, int maxlen) |
int | CCutil_sread_short (CC_SFILE *f, short *x) |
int | CCutil_sread_ushort (CC_SFILE *f, unsigned short *x) |
int | CCutil_sread_short_r (CC_SFILE *f, short *x) |
int | CCutil_sread_int (CC_SFILE *f, int *x) |
int | CCutil_sread_uint (CC_SFILE *f, unsigned int *x) |
int | CCutil_sread_int_r (CC_SFILE *f, int *x) |
int | CCutil_sread_double (CC_SFILE *f, double *x) |
int | CCutil_sread_double_r (CC_SFILE *f, double *x) |
int | CCutil_sflush (CC_SFILE *f) |
int | CCutil_stell (CC_SFILE *f) |
int | CCutil_sseek (CC_SFILE *f, int offset) |
int | CCutil_srewind (CC_SFILE *f) |
int | CCutil_sclose (CC_SFILE *f) |
int | CCutil_sbits (unsigned int x) |
int | CCutil_sdelete_file (const char *fname) |
int | CCutil_sdelete_file_backup (const char *fname) |
CC_SFILE * | CCutil_snet_open (const char *hname, unsigned p) |
CC_SFILE ** | CCutil_snet_receive (CC_SPORT *s) |
CC_SPORT * | CCutil_snet_listen (unsigned p) |
void | CCutil_snet_unlisten (CC_SPORT *s) |
int | CCutil_signal_handler (int ccsignum, CCutil_handler handler) |
int | CCutil_signal_default (int ccsignum) |
int | CCutil_signal_ignore (int ccsignum) |
int | CCutil_sig_to_ccsig (int signum) |
void | CCutil_signal_init (void) |
void | CCutil_handler_fatal (int signum) |
void | CCutil_handler_warn (int signum) |
void | CCutil_handler_exit (int signum) |
void | CCutil_int_array_quicksort (int *len, int n) |
void | CCutil_int_perm_quicksort (int *perm, int *len, int n) |
void | CCutil_double_perm_quicksort (int *perm, double *len, int n) |
void | CCutil_rselect (int *arr, int l, int r, int m, double *coord, CCrandstate *rstate) |
char * | CCutil_linked_radixsort (char *data, char *datanext, char *dataval, int valsize) |
int | CCutil_karp_partition (int ncount, CCdatagroup *dat, int partsize, int *p_scount, CCsubdiv **p_slist, int ***partlist, CCrandstate *rstate) |
int | CCutil_write_subdivision_index (char *problabel, int ncount, int scount, CCsubdiv *slist) |
int | CCutil_read_subdivision_index (char *index_name, char **p_problabel, int *p_ncount, int *p_scount, CCsubdiv **p_slist) |
int | CCutil_write_subdivision_lkh_index (char *problabel, int ncount, int scount, CCsubdiv_lkh *slist, double tourlen) |
int | CCutil_read_subdivision_lkh_index (char *index_name, char **p_problabel, int *p_ncount, int *p_scount, CCsubdiv_lkh **p_slist, double *p_tourlen) |
void | CCutil_sprand (int seed, CCrandstate *r) |
int | CCutil_lprand (CCrandstate *r) |
double | CCutil_normrand (CCrandstate *r) |
char * | CCutil_strchr (char *s, int c) |
char ** | CCutil_strrchr (char *s, int c) |
char *** | CCutil_strdup (const char *s) |
char **** | CCutil_strdup2 (const char *s) |
const char * | CCutil_strchr_c (const char *s, int c) |
const char ** | CCutil_strrchr_c (const char *s, int c) |
unsigned int | CCutil_nextprime (unsigned int x) |
int | CCutil_our_gcd (int a, int b) |
int | CCutil_our_lcm (int a, int b) |
int | CCutil_print_command (int ac, char **av) |
void | CCutil_readstr (FILE *f, char *s, int len) |
void | CCutil_printlabel (void) |
double | CCutil_zeit (void) |
double | CCutil_real_zeit (void) |
double | CCutil_stop_timer (CCutil_timer *t, int printit) |
double | CCutil_total_timer (CCutil_timer *t, int printit) |
void | CCutil_init_timer (CCutil_timer *t, const char *name) |
void | CCutil_start_timer (CCutil_timer *t) |
void | CCutil_suspend_timer (CCutil_timer *t) |
void | CCutil_resume_timer (CCutil_timer *t) |