一、图的定义 二、图的类型定义 三、图的存储结构 (1)无向图邻接矩阵 (2)有向图邻接矩阵 (3)网的邻接矩阵 (4)邻接矩阵存储表示 1、用两个数组分别存储顶点表和邻接矩阵 #define MVNum 100 typedef char VerTexType; typedef int ArcType; typedef struct{ VerTexType vexs[MVNum]; ArcType arcs[MVNum][MVNum]; int vexnum, arcnum; }AMGraph; 2、采用邻接矩阵表示法创建无向图 #include <iostream> #include <climits> #include <sstream> using namespace std; #define MVNum 100 typedef char VerTexType; typedef int ArcType; typedef enum { ERROR, OK } Status; typedef struct { VerTexType vexs[MVNum]; ArcType...
Is this you? As a journalist, you can create a free Muck Rack account to customize your profile, list your contact preferences, and upload a portfolio of your best work.
Claim your profile
Get in touch with istringstream
Contact istringstream, search articles and posts on X, monitor coverage, and track replies from one place.
Learn more about Muck Rack