neo4j-contrib / neo4j-graph-algorithms

Efficient Graph Algorithms for Neo4j
https://github.com/neo4j/graph-data-science/
GNU General Public License v3.0
772 stars 194 forks source link

Single shortest path procedure yield path #243

Open tomasonjo opened 7 years ago

tomasonjo commented 7 years ago

We had a feature request, that algo.shortestPath.(stream) should be able to yield path, like the apoc ones.

mknblch commented 7 years ago

Can you be more precise pls :) I dont know exactly what apoc returns.

So far we have either algo.shortestPath which returns the actual nodeIds of each step of the path and we have algo.shortestPaths which returns the distance to every other node in the graph.

tomasonjo commented 7 years ago

Apoc returns path format, which is basically what you get if you run this query on any data

MATCH p=(a)--(b)
RETURN p LIMIT 1