图的存储
来源:互联网 发布:海口seo外包公司 编辑:程序博客网 时间:2024/05/16 16:58
#pragma once#include"stdafx.h"#define MaxVertexNum 100//图的存储---邻接矩阵法(有向图、无向图)typedef char VertexType;typedef int EdgeType;typedef struct {VertexType Vex[MaxVertexNum];int vexnum, arcnum;}MGraph; //图的存储---邻接表法(有向图、无向图)typedef struct ArcNode { //边表结点int adjvex;struct ArcNode * next;//InfoType info;}ArcNode;typedef struct VNode {//顶点表结点VertexType data;ArcNode *first;}VNode,AdjList[MaxVertexNum];typedef struct AlGraph{//邻接表AdjList vertices;int vexnum, arcnum;}ALGraph;//图的存储---十字链表(有向图)typedef struct ArcNodeT {//边表结点//以该点作为尾巴 指向其他点作为箭头int tailvex, headvex;struct ArcNodeT *hlink, *tlink;//InfoType info;}ArcNodeT;typedef struct VNodeT {//顶点表结点VertexType data;ArcNodeT *firstin, *firstout;}VNodeT;typedef struct GLGraph {//邻接表VNodeT xlist[MaxVertexNum];int vexnum, arcnum;}GLGraph;//图的存储---邻接多重表(无向图)typedef struct ArcNodeTr { //边表结点bool mark;int ivex, jvex;struct ArcNodeTr *ilink, *jlink;//InfoType info;}ArcNodeTr;typedef struct VNodeTr {//顶点表结点VertexType data;ArcNodeTr *firstedge;}VNodeTr;typedef struct AMLGraph {//邻接表VNodeTr adjmulist[MaxVertexNum];int vexnum, arcnum;}AMLGraph;
阅读全文
0 0
- 图的存储结构(存储、遍历)
- 图的存储结构
- 图的存储结构
- 图的存储-邻接矩阵
- 图的存储
- 图的存储结构
- 图的邻接矩阵存储
- 图的存储方式
- 图的存储
- 图的存储结构
- 图的存储
- 图的存储结构
- 图的存储
- 图的存储结构
- 图的存储
- 图的存储结构
- 图的存储
- 图的存储方式
- Linux报错ping: https://www.baidu.com: Name or service not known;centos7 无法启动网络(service network restart
- 朴素贝叶斯应用之文本分类
- 安装国际版 WPS
- Spring Boot中使用MongoDB数据库
- UVA 401 Palindromes
- 图的存储
- Python爬虫学习纪要(七):Requests 库学习笔记2
- 好的技术网站收录
- C语言单元小结(1)
- shader总结七
- 什么是重定位?为什么需要重定位?(嵌入式下)
- 第一个项目(游戏)
- Spring Boot中Web应用的统一异常处理
- Java for Web学习笔记(九一):消息和集群(6)利用websocket实现订阅和发布(下)