/**********************************************************************/ /* */ /* (c) Copyright, 1997 by Professor Gabriel Robins */ /* */ /* Department of Computer Science, University of Virginia */ /* Charlottesville, VA 22903-2442 (804) 982-2207 */ /* robins@cs.virginia.edu http://www.cs.virginia.edu/~robins/ */ /* */ /* This code may be freely used for all non-commercial purposes. */ /* All copies/portions of this code must contain this header. */ /* */ /**********************************************************************/ /**********************************************************************/ /* Globals.c */ /**********************************************************************/ #include "geometry.h" /**********************************************************************/ int set_sizes[18] = { 3,4,5,6,8,10,16,20,25,35,50,64,128,256,512,1024,2048,4096 }; int iterations[13] = { 1,2,3,5,10,50,100,300,1000,3000,5000,10000,15000 }; int grid_sizes[9] = { 10,20,50,100,300,500,1000,5000,10000 }; unsigned long int next = 1; unsigned long int initial_seed = 1; #ifdef MAC int GRAPHICS = YES; #endif #ifdef SUN int GRAPHICS = YES; #endif /* double SCALE_FACTOR = 1.5; */ int number_of_points = 4; int pointset_cardinality = 2; int number_of_iterations = 3; int iterations_cardinality = 3; int grid_size = 10000; int grid_size_cardinality = 5; int size = 5; extern int choice; int OUT_TREE = 0; #ifdef MAC Rect dragRect; Rect windowBounds = { window_top, window_left, window_height + window_top, window_width + window_left }; MenuHandle appleMenu, fileMenu, editMenu, pointMenu, sizeMenu, iterationsMenu, metricMenu, CGMenu, gridMenu; WindowPtr CGWindow; #endif #ifdef SUN XSizeHints *the_sizehints; GC gc; Display *the_display; Window window,rootwindow; int the_screen; #endif /**********************************************************************/ struct edge *edges; struct point *pointset, *SP_candidates; NODE *Tree,*old_Tree; ; EDGE *Neighbour; int *hit_list, *num_N_pts[HEURISTICS], *degree_count, number_of_edges; int *Steiner_savings; int metric_type = Manhattan, L_edge_orientation = low_L; int mst_cost, sum[HEURISTICS], total_mst_cost=0, steiner_cost[HEURISTICS], total_steiner_cost[HEURISTICS], improvement_percent[HEURISTICS], max_improvement[HEURISTICS], min_improvement[HEURISTICS], ave_num_steiner_pts[HEURISTICS], normalization_constant; int num_steiner_pts[HEURISTICS], min_num_steiner_pts[HEURISTICS], max_num_steiner_pts[HEURISTICS], min_round= MAXINT, max_round=0, total_round=0; int unique_identifier = 0; char msg[string_length]; int num_edges, num_graph_edges, original_nop; char *errorstrings[] = { "***** Error: Storage allocation for %s\n", "***** Error: Cannot open file %s\n"}; char graphic_flag; /**********************************************************************/