数据结构开发性试验_最小生成树、关键路径、拓扑排序.docVIP

  • 8
  • 0
  • 约1.13万字
  • 约 17页
  • 2017-08-15 发布于重庆
  • 举报

数据结构开发性试验_最小生成树、关键路径、拓扑排序.doc

数据结构开发性试验_最小生成树、关键路径、拓扑排序.doc

图论相关算法的设计与实现#include math.h #include stdio.h #include string.h #include stdlib.h #include limits.h typedef int Status; typedef int VRType; #define MAX_VERTEX_NUM 20 #define INT_MAX 32768 #define OK 1 #define ERROR -1 typedef struct { VRType adj; }ArcCell,AdjMatrix[MAX_VERTEX_NUM][MAX_VERTEX_NUM]; typedef struct { char vexs[MAX_VERTEX_NUM]; AdjMatrix arcs; int vexnum,arcnum; }MGraph,*ZMGraph; typedef struct { char adjvex; int lowcost; }closedge[MAX_VERTEX_NUM]; int LocateVex(ZMGraph G,char v) { int i; for(i=0;iG-vexnum;i++) if(v==G-vex

文档评论(0)

1亿VIP精品文档

相关文档