Skip to content

Commit d53e755

Browse files
committed
add single_source_shortest_path algorithms and all_node_pair_shortest_path algorithms
1 parent eacee37 commit d53e755

File tree

454 files changed

+19686
-5184
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

454 files changed

+19686
-5184
lines changed

Diff for: Introduction_to_Algorithms.pro

+19-1
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,25 @@ HEADERS += \
6868
src/graph_algorithms/basic_graph/connected_component/connectedcomponent.h \
6969
src/graph_algorithms/basic_graph/connected_component/connectedcomponent_test.h \
7070
src/graph_algorithms/single_source_shortest_path/bellman_ford/bellmanford.h \
71-
src/graph_algorithms/single_source_shortest_path/bellman_ford/bellmanford_test.h
71+
src/graph_algorithms/single_source_shortest_path/bellman_ford/bellmanford_test.h \
72+
src/graph_algorithms/single_source_shortest_path/dag_shortest_path/dagshortpath.h \
73+
src/graph_algorithms/single_source_shortest_path/dag_shortest_path/dagshortpath_test.h \
74+
src/graph_algorithms/basic_graph/graph_representation/graph_vertex/bfs_vertex.h \
75+
src/graph_algorithms/basic_graph/graph_representation/graph_vertex/bfs_vertex_test.h \
76+
src/graph_algorithms/basic_graph/graph_representation/graph_vertex/dfs_vertex.h \
77+
src/graph_algorithms/basic_graph/graph_representation/graph_vertex/dfs_vertex_test.h \
78+
src/graph_algorithms/basic_graph/graph_representation/graph_vertex/vertexp.h \
79+
src/graph_algorithms/basic_graph/graph_representation/graph_vertex/vertexp_test.h \
80+
src/graph_algorithms/single_source_shortest_path/dijkstra/dijkstra.h \
81+
src/graph_algorithms/single_source_shortest_path/dijkstra/dijkstra_test.h \
82+
src/graph_algorithms/all_node_pair_shortest_path/matrix_shortest_path/matrix_shortest_path.h \
83+
src/graph_algorithms/all_node_pair_shortest_path/matrix_shortest_path/matrix_shortest_path_test.h \
84+
src/graph_algorithms/all_node_pair_shortest_path/floyd_warshall/floyd_warshall.h \
85+
src/graph_algorithms/all_node_pair_shortest_path/floyd_warshall/floyd_warshall_test.h \
86+
src/graph_algorithms/all_node_pair_shortest_path/johnson/johnson.h \
87+
src/graph_algorithms/all_node_pair_shortest_path/johnson/johnson_test.h \
88+
src/graph_algorithms/basic_graph/graph_representation/graph_vertex/set_vertex.h \
89+
src/graph_algorithms/basic_graph/graph_representation/graph_vertex/set_vertex_test.h
7290

7391

7492

Diff for: README.md

+11-3
Original file line numberDiff line numberDiff line change
@@ -58,11 +58,17 @@ src\
5858
topology_sort:有向无环图的拓扑排序算法
5959
strong_connected_component:有向图的强连通分量算法
6060
connected_component:无向图的连通分量算法
61-
minimum_spanning_tree\ :最小生成树算法
61+
minimum_spanning_tree\ :无向图最小生成树算法
6262
kruskal : 最小生成树的 kruskal 算法
6363
prim : 最小生成树的 prim 算法
64-
single_source_shortest_path\: 单源最短路径算法
64+
single_source_shortest_path\: 有向图单源最短路径算法
6565
bellman_ford :单源最短路径的 bellman_ford算法
66+
dag_shortest_path:单源最短路径的dag_shortest_path算法
67+
dijkstra:单源最短路径的dijkstra算法
68+
all_node_pair_shortest_path\ :有向图所有结点对之间的最短路径算法
69+
matrix_shortest_path:结点对之间最短路径的矩阵算法和复平方算法
70+
floyd_warshall:所有结点对之间最短路径的floyd_warshall算法
71+
johnson:所有结点对之间最短路径的johnson算法
6672
...(未完待续)
6773
doc\ :由doxygen自动生成的文档
6874
Doxyfile :doxygen配置文件
@@ -73,7 +79,9 @@ Introduction_to_Algorithms.pro :Qt项目配置文件
7379
使用时只需要包含相应的头文件即可
7480
* 本项目所有算法都是用 `C++ Template`实现,因此算法的实现都在`.h`文件中
7581
* 本项目所有算法都有测试代码。如快速排序在`quicksort.h`中,快速排序的测试代码在`quicksort_test.h`中,二者位于同一目录下
76-
* 本项目所有的命名空间、函数、类以及必要的成员都打上了`doxygen`注释,可以方便的进行文档化
82+
* 本项目所有的命名空间、函数、类以及必要的成员都打上了`doxygen`注释,可以方便的进行文档化。目前`\doc`文件夹中已经有转换过来的`html`文件,你也可以自己利用doxygen来执行文档转换工作。文档化之后的帮助文档在浏览器中打开如图所示:
83+
84+
![doc文件](./doc.JPG)
7785

7886
**本文档仅用于个人学习目的,未经许可不得用于商业目的,转载请注明出处**
7987

Diff for: doc.JPG

199 KB
Loading

Diff for: doc/html/adjlistgraph__test_8h.html

+1
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,7 @@
114114
<div class="contents">
115115
<div class="textblock"><code>#include &quot;src/google_test/gtest.h&quot;</code><br />
116116
<code>#include &quot;<a class="el" href="adjlistgraph_8h_source.html">adjlistgraph.h</a>&quot;</code><br />
117+
<code>#include &lt;memory&gt;</code><br />
117118
</div>
118119
<p><a href="adjlistgraph__test_8h_source.html">Go to the source code of this file.</a></p>
119120
<table class="memberdecls">

Diff for: doc/html/adjlistgraph__test_8h_source.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@
129129
<div class="line"><a name="l00020"></a><span class="lineno"> 20</span>&#160;<span class="preprocessor">#define ADJLISTGRAPH_TEST</span></div>
130130
<div class="line"><a name="l00021"></a><span class="lineno"> 21</span>&#160;<span class="preprocessor">#include&quot;src/google_test/gtest.h&quot;</span></div>
131131
<div class="line"><a name="l00022"></a><span class="lineno"> 22</span>&#160;<span class="preprocessor">#include&quot;<a class="code" href="adjlistgraph_8h.html">adjlistgraph.h</a>&quot;</span></div>
132-
<div class="line"><a name="l00023"></a><span class="lineno"> 23</span>&#160;</div>
132+
<div class="line"><a name="l00023"></a><span class="lineno"> 23</span>&#160;<span class="preprocessor">#include&lt;memory&gt;</span></div>
133133
<div class="line"><a name="l00024"></a><span class="lineno"><a class="line" href="namespaceanonymous__namespace_02adjlistgraph__test_8h_03.html"> 24</a></span>&#160;<span class="keyword">namespace </span>{</div>
134134
<div class="line"><a name="l00025"></a><span class="lineno"><a class="line" href="namespaceanonymous__namespace_02adjlistgraph__test_8h_03.html#a398e679d6fa790bc3ff7d6a7c92a7d74"> 25</a></span>&#160; <span class="keyword">const</span> <span class="keywordtype">int</span> <a class="code" href="namespaceanonymous__namespace_02adjlistgraph__test_8h_03.html#a398e679d6fa790bc3ff7d6a7c92a7d74">ADJ_NUM</a>=10;</div>
135135
<div class="line"><a name="l00026"></a><span class="lineno"> 26</span>&#160;}</div>

0 commit comments

Comments
 (0)