全国交通咨询模拟数据结构课程设计
}ArcNode;
typedef struct VNode {char cityname[10];
ArcNode *planefirstarc,*trainfirstarc; }VNode,AdjList[MAX_VERTEX_NUM]; typedef struct {AdjList vertices;
int vexnum,planearcnum,trainarcnum; }ALGraph;
typedef struct Node {int adjvex; int route;
struct Node *next; }Node;
typedef struct QNode {int adjvex;
struct QNode *next; }QNode; typedef struct {QNode *front; QNode *rear; }LinkQueue;
typedef struct TimeNode {int adjvex; int route;
int begintime[2]; int arrivetime[2];
struct TimeNode *child[MAX_ROUTE_NUM]; }TimeNode,*TimeTree; struct arc {int co;
char vt[10]; char vh[10]; int bt[2]; int at[2]; float mo;
}a[MAX_ARC_SIZE];
基本操作:
void Administer(ALGraph *G); void cityedit(ALGraph *G);
void CopyTimeTree(TimeTree p,TimeTree q); void createcityfile();
void CreateGraph(ALGraph *G); void createplanefile();