@graphty/algorithms / index / walkPredArcs
Function: walkPredArcs() ​
walkPredArcs(
g,predArc,source,targetNode):U32
Defined in: indexed/dijkstra.ts:84
Walk the predecessor arcs back from target and return the node path, source first.
Parameters ​
g ​
AdjacencyView
The adjacency the search ran on
predArc ​
U32
The search's predecessor-arc array
source ​
number
The search's source node index
targetNode ​
NodeRef
The node to walk back from: its index, or { id }
Returns ​
U32
Node indices from source to target inclusive, or an empty array when unreached
Throws ​
PathWalkError when predArc has a gap or a cycle between target and source