dfs_bfs_animation_-using-networkx-:dfs_bfs_animation_(使用networkx)

时间:2021-04-18 08:32:01
【文件属性】:
文件名称:dfs_bfs_animation_-using-networkx-:dfs_bfs_animation_(使用networkx)
文件大小:595KB
文件格式:ZIP
更新时间:2021-04-18 08:32:01
Python 使用networkx的dfs,bfs动画 这是我的学生项目,其任务是学习如何在图形上可视化算法。 在这项工作中,我对DFS和BFS的工作进行了动画处理。 为了处理图形,我使用了networkx包以及matplotlib和celluloid包来创建一个.gif文件。 安装依赖项 需要安装第三方依赖项。 为此,请在python控制台中编写。 pip install -r requirements 使用程序的例子 首先,必须用邻接表填充文本文件。 注意:该文件应仅包含以下格式的行: node1: node2, node3... 例如,位于演示文件“ ../input/graph.txt”中的文件的内容以及主要功能的默认设置。 A: B, C B: D, E C: F, G D: H E: I, J 然后,它足以调用与所需的参数主要功能start -节点从搜索开始。 (可选)可以指定带有图
【文件预览】:
dfs_bfs_animation_-using-networkx--main
----.gitignore(2KB)
----test_source()
--------dfs animation (...test_source.test_graph_1.txt).gif(339KB)
--------test_graph_1.txt(62B)
--------bfs animation (...test_source.test_graph_1.txt).gif(388KB)
----requirements.txt(64B)
----output()
--------dfs animation (...input.graph.txt).gif(302KB)
--------bfs animation (...input.graph.txt).gif(306KB)
----src()
--------__init__.py(0B)
--------graph_tools.py(3KB)
--------algorithms.py(2KB)
--------test_public.py(3KB)
--------main.py(2KB)
--------graph_reader.py(567B)
----.github()
--------.keep(0B)
--------workflows()
----README.md(2KB)
----input()
--------graph.txt(36B)

网友评论