数据结构ch7.ppt

数据结构ch7

第7章 图 7.1 图的定义和术语 一.抽象数据类型定义 ADT Graph { 数据对象V:V是具有相同特性的数据元素的集合, 称为顶点集。 数据关系R:R={VR} VR={v,w| v,w∈V且P(v,w), v,w表示从v到w的弧, 谓词P(v,w)定义了弧v,w的意义或信息 基本操作P:} #define MAX_VERTEX_NUM 20 typedef struct ArcNode { int adjvex; struct ArcNode *nextarc; InfoType *info; } ArcNode; typedef struct VNode { VertexType data; ArcNode *firstarc; } VNode, AdjList[MAX_VERTEX_NUM]; typedef struct { AdjList vertices; int vexnum, arcnum; int kind;

文档评论(0)

1亿VIP精品文档

相关文档