https://github.com/oeljeklaus-you/tempgraphpath
时序图单源最短路径算法
https://github.com/oeljeklaus-you/tempgraphpath
bfs-algorithm dfs-algorithm graph-algorithms temporal-networks
Last synced: 2 months ago
JSON representation
时序图单源最短路径算法
- Host: GitHub
- URL: https://github.com/oeljeklaus-you/tempgraphpath
- Owner: oeljeklaus-you
- License: mit
- Created: 2019-02-20T03:47:40.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2019-02-20T13:05:06.000Z (over 6 years ago)
- Last Synced: 2025-02-15T06:31:34.873Z (4 months ago)
- Topics: bfs-algorithm, dfs-algorithm, graph-algorithms, temporal-networks
- Language: C++
- Size: 84 KB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# TempGraphPath
**时序图单源最短路径算法**
## 四种基本的单源最短路径
**最早抵达路径**:对于点u到v,如果存在一条u到v的路径且抵达v的时间最小,那么该路径为最早抵达路径。**最短抵达路径**:对于点u到v,如果存在一条u到v的路径且抵达v用的跳数最小,那么该路径为最晚离开路径。
**最晚离开路径**:对于点u到v,如果存在一条u到v的路径且离开u的时间最大,那么该路径为最晚离开路径。
**最快抵达路径**:对于点u到v,如果存在一条u到v的路径且离开u的时间与抵达v的时间之差最小,那么该路径
为最晚离开路径。
## 时序图四种基本路径
现在假设边上的数字表示为出发时间,持续时间均为1.
一条时序路径如下:P = <(a,f,3,1),(f,i,5,1),(i,l,8,1)>,start(P) = 3, end(P) = 8+1 = 9, dura(P) = 9−3 = 6
and dist(P) = 1 + 1 + 1 = 3.
最早抵达路径为:min{end(P)},最短抵达路径:min{dist(P)},最快抵达路径:min{dura(P)},最晚离开路径:max{start(P)}.