在我运行算法(Dijkstra Single Source)之后,结果如下:
match (source:Node1 {NAME:'H'})
call gds.allShortestPaths.dijkstra.stream('undirectedGOES', {sourceNode: source})
yield index, sourceNode, targetNode, nodeIds, path
return
index, sourceNode, targetNode, nodeIds, path
order by index
我知道我可以使用nodes(path)
函数只显示一条路径,但该函数只返回原始路径(方向不正确)。
match (source:Node1 {NAME:'H'})
call gds.allShortestPaths.dijkstra.stream('undirectedGOES', {sourceNode: source})
yield index, sourceNode, targetNode, nodeIds, path
return
index, sourceNode, targetNode, nodeIds, nodes(path) as path
order by index
有没有办法只显示节点之间的单一路径,但由算法产生?有些方向是不同的(在运行算法之前和之后),那条信息正是我所需要的。