g3-toolkit API Reference
    Preparing search index...

    Function allShortestPaths

    • Union of ALL shortest paths between two nodes (review 9.17: the singular findShortestPath made "Find paths to here" a one-path demo by construction). Layered BFS from the source records each node's distance; an edge belongs to the union iff it steps from distance d to d+1 along some shortest route, collected by walking backward from the target through distance-decreasing edges. The result is the SUBGRAPH of shortest routes (nodeIds/edgeIds), plus the route count (capped: counts can be exponential in dense graphs; the cap keeps the label honest as "50+").

      Parameters

      • ugm: UGM
      • sourceId: string
      • targetId: string
      • Optionaloptions: PathOptions & { countCap?: number }

      Returns PathResult & { pathCount: number }