我正在使用gds.alpha.allShortestPaths.stream()
图形投影。
我想在具有特定属性值的节点子集上运行该算法,但文档说 allShortestPaths 算法只接受图形投影作为输入。我认为在整个图形投影上运行算法是不可能的,因为它由大约 1500 万个节点组成。
我会喜欢这样的东西,我可以完全绕过图形投影部分:
CALL algo.shortestPath.stream(hgnc)
YIELD sourceNodeId, targetNodeId, distance WITH sourceNodeId, targetNodeId, distance
WHERE gds.util.isFinite(distance) = true
WITH source, target, distance
WHERE source <> target
RETURN source.name AS source, target.name AS target, distance```
But with the All Pairs Shortest Path algorithm obviously.