需要 NetworkX 帮助
目前我面临以下问题:
我有一个脚本可以搜索包含文档的特定目录。每个文档在文件名中都分配有一个编号。每个文档中的数字也代表另一个文档(文件名)。如何创建一个网络来显示哪些文档会导致什么结果?
任何帮助将不胜感激,谢谢
Currently im faced with the following problem:
I have a script that searches through a specific directory that contains documents. Each document is assigned a number within the filename. Within each document are numbers that also represent another document (filename). How can I create a web that shows what documents lead to what?
Any help would be appreciated, thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这是有向图的教科书示例。您应该阅读 NetworkX 教程,以更好地了解如何使用它们;基本上,您需要添加所有节点(点),在本例中为文件编号,然后在它们之间添加边。
This is a textbook example of a directed graph. You should read the NetworkX tutorial to get a better idea of how to work with them; basically, you need to add all the nodes (points), in this case file numbers, and then add edges between them.