ALGpraph.h #pragma once/************************************************************************/ /* 图的邻接表存储结构 */ /************************************************************************/ #define MaxVertexNum 100 #define QueueSize 30 typedef char VertexType; typedef int ArcType; typedef struct node //边表结点 { int adjvex; //邻接点域 struct node* next; //域链 //若是要表示边上的权,则应增加一个数据域 }ArcNode; typedef struct vnode //顶点边结点 { VertexType vertex; //顶点域 ArcNode* firstedge;//边表头指针 }VertexNode; typedef VertexNode AdjList[MaxVertexNum]; //AdjList是邻接表类型 typedef struct { AdjList adjlist; //邻接表 int n;//图中当前顶点数int e;//图中当前边数 }ALGraph; //对于简单的应用,无须定义此类型,可直接使用AdjList类型 ALGraph* initALGraph(); int TopoSort(ALGraph* a); #pragma once/***************** 你的当前访问异常,请进行认证后继续阅读剩余内容。 提交