c - 我如何找到 igraph 的最短路径的底层 C 代码?

标签 c r igraph

我想看看 igraph 函数 distances 的代码 我想看看 Dijkstra 算法的实现,看看是否可以尽快做出改变当固定源和目标之间的任何路径超过阈值时,该路径将在搜索中终止。

我可以看到该函数调用了 C_R_igraph_shortest_paths 但我在 Github 上的 R 或 C 的 igraph 包信息中找不到它。我知道距离函数保存在 structural.properties.R 文件中,但我没有比这更进一步的了。

我以前没有看过这个深度,所以我可能错过了一些明显的东西。

最佳答案

看igraph的C接口(interface):

源码在 GitHub 上:

查看 structural_properties.c

I'd like to look at the implementation of the Dijkstra algorithm, to see if it is possible to make a change such that as soon as any path, between a fixed source and target, exceeds a threshold then that path is terminated in the search.

是的,这是可能的,并且有一个 Unresolved 问题。欢迎 PR!

关于c - 我如何找到 igraph 的最短路径的底层 C 代码?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52571006/

相关文章:

c - 如何在 GtkTable 上实现按钮按下事件

r - 如何创建包含嵌套 xts 对象 - 雅虎数据的列?

r - 如果包含,则提取直到下一个 "_"

r - 根据时间间隔对 R 中的行进行子集化

python - 安装 python-igraph 时出现 UnicodeDecodeError

随机删除n条边而不断开图

c - 将 float 与整数相加时出现整数类型错误

C语言与多线程程序设计

检查已分配内存的大小

Python igraph 顶点索引