#include<bits/stdc++.h>
using namespace std;
//--邻接矩阵定义-------
#define MaxVertexNum 100
typedef char VerTexType;
typedef int EdgeType;
typedef struct{
VertexType Vexp[MaxVertexNum];
EdgeType Edge[MaxVertexNum][MaxVwertexNum];
int vexnum,arcnum;
}MGraph;
//--邻接表定义---------
//#define MaxVertexNum 100
//邻接表结点
typedef struct ArcNode{
int adjvex;
struct ArcNode *next;
}ArcNode;
//顶点表节点
typedef struct VNode{
VertexType data;
ArcNode *first;
}VNode,AdjList[MaxVertexNum];
//图的邻接表
typedef struct{
AdjList vertices;
int vexnum,acrnum;
}ALGraph;
void MGtoALG(MGraph G){
}
图的存储
最新推荐文章于 2023-04-05 18:55:52 发布