apoc.algo.dijkstra

Procedure APOC Core

apoc.algo.dijkstra(startNode, endNode, 'KNOWS|<WORKS_WITH|IS_MANAGER_OF>', 'distance', defaultValue, numberOfWantedResults) YIELD path, weight - run dijkstra with relationship property name as cost function

Signature

apoc.algo.dijkstra(startNode :: NODE?, endNode :: NODE?, relationshipTypesAndDirections :: STRING?, weightPropertyName :: STRING?, defaultWeight = NaN :: FLOAT?, numberOfWantedPaths = 1 :: INTEGER?) :: (path :: PATH?, weight :: FLOAT?)

Input parameters

Name Type Default

startNode

NODE?

null

endNode

NODE?

null

relationshipTypesAndDirections

STRING?

null

weightPropertyName

STRING?

null

defaultWeight

FLOAT?

NaN

numberOfWantedPaths

INTEGER?

1

Output parameters

Name Type

path

PATH?

weight

FLOAT?