十字列表
#include<iostream>
using namespace std;
#define MAX_VERTEX_NUM 20
typedef int InfoType;
typedef int VertexType;
typedef struct ArcBox { //定义弧节点
int tailvex, headvex;//弧头和弧尾顶点的位置
struct ArcBox* hlink;//弧头相同的弧的链域
struct ArcBox* tling;//弧尾相同的弧的链域
InfoType* info;//弧相关的信息的指针
}ArcBox;
typedef struct VexNode {//定义头节点
VertexType data;//头节点的数据元素
ArcBox* firstin, * fristout;//该顶点的第一条入弧和出弧
}VexNode;
typedef struct {
VexNode xlist[MAX_VERTEX_NUM];//表头向量
int vexnum, arcnum;//有向图的顶点数和弧数
}OLGraph;


被折叠的 条评论
为什么被折叠?



