00001
00002 struct node_entry {
00003 int degree;
00004 int label;
00005 int x;
00006 int y;
00007 struct edge_ent *adj_list;
00008 };
00009 typedef struct node_entry *Graph;
00010
00011 struct edge_ent {
00012 int endpoint;
00013 int label;
00014 int label2;
00015 struct edge_ent *nextedge;
00016 struct edge_ent *prevedge;
00017 struct edge_ent *otheredge;
00018 };
00019 typedef struct edge_ent *Edge;
00020
00021 extern Graph ReadGraph(),NewGraph(),CopyGraph();
00022 extern int RemoveEdge(),NumEdges();
00023 extern Edge FindEdge();
00024
00025 #define Degree(graph,n) (graph[n].degree)
00026 #define NLabel(graph,n) (graph[n].label)
00027 #define Xcoord(graph,n) (graph[n].x)
00028 #define Ycoord(graph,n) (graph[n].y)
00029 #define FirstEdge(graph,n) (graph[n].adj_list)
00030
00031 #define EndPoint(e) (e->endpoint)
00032 #define ELabel(e) (e->label)
00033 #define ELabel2(e) (e->label2)
00034 #define Other(e) (e->otheredge)
00035 #define NextEdge(e) (e->nextedge)
00036
00037
00038 extern Graph Prim();
00039 extern int *EulerTraverse(),*Match(),*Weighted_Match(),*Dijkstra(),*Concomp();
00040
00041
00042 typedef int (*EuclidGraph)[2];
00043
00044 extern Graph EuclidPrim();
00045 extern EuclidGraph ReadEuclid(),NewEuclid();
00046 extern int eucdist(),eucdistsq();
00047
00048 extern int *CvxHull();
00049
00050
00051 typedef int *MatrixGraph;
00052
00053 extern int *MatrixDijkstra();
00054 extern Graph MatrixPrim();
00055 extern Graph MatrixMaxFlow();
00056 extern MatrixGraph ReadMatrix(), NewMatrix();
00057