Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
L
Lab019
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
问题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
银宸时代
DS Lab Group
实验项目模板
Lab019
提交
8de1390d
提交
8de1390d
5月 21, 2019
创建
作者:
宋海霞
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
modify
上级
67e651d9
隐藏空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
10 行增加
和
10 行删除
+10
-10
ShortestPath.h
ShortestPath.h
+10
-10
没有找到文件。
ShortestPath.h
浏览文件 @
8de1390d
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
//
//
//
在此处包含 C 标准库头文件
//
Include the C standard library header file here
//
//
...
@@ -11,30 +11,30 @@
...
@@ -11,30 +11,30 @@
//
//
//
在此处包含其他头文件
//
Other header files are included here
//
//
//
//
//
在此处定义数据结构
//
Define the data structure here
//
//
#define MAX 100000000 //
表示两顶点间无边直接连接,邻接矩阵中用MAX表示
#define MAX 100000000 //
Denotes the direct connection between two vertices, denoted by MAX in the adjacency matrix
#define VERTEXNUM 6 //
顶点数量
#define VERTEXNUM 6 //
Vertex number
typedef
struct
GraphMatrix
{
typedef
struct
GraphMatrix
{
int
Arcs
[
VERTEXNUM
][
VERTEXNUM
];
//
边信息
int
Arcs
[
VERTEXNUM
][
VERTEXNUM
];
//
Edge information
}
GraphMatrix
;
}
GraphMatrix
;
typedef
struct
ShortestPath
{
typedef
struct
ShortestPath
{
int
length
;
//
最短路径长度
int
length
;
//
Shortest path length
int
prevex
;
//
从 Vo 到达 Vi 的最短路径上 Vi 的前驱顶点
int
prevex
;
//
The leading vertex of Vi on the shortest path from Vo to Vi
}
ShortestPath
;
}
ShortestPath
;
//
//
//
声明函数
//
Declare functions
//
//
...
@@ -43,7 +43,7 @@ void OutputResult(GraphMatrix* pGraph);
...
@@ -43,7 +43,7 @@ void OutputResult(GraphMatrix* pGraph);
//
//
//
在此处声明全局变量
//
Declare global variables here
//
//
extern
ShortestPath
dist
[
MAX
];
extern
ShortestPath
dist
[
MAX
];
...
...
编写
预览
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论