实现图的邻接矩阵和邻接表存储

时间:2014-09-04 09:39:46
【文件属性】:
文件名称:实现图的邻接矩阵和邻接表存储
文件大小:31KB
文件格式:DOC
更新时间:2014-09-04 09:39:46
邻接矩阵 邻接表 #include #include #define MAXV 100 //以下定义邻接矩阵类型 typedef struct { int no; //顶点编号 int info; //顶点其余的信息 }VertexType; typedef struct { int edges[MAXV][MAXV]; //邻接矩阵 int n,e; //顶点数,弧数 VertexType vexs[MAXV]; //存放顶点信息 }MGraph;

网友评论