Skip to content

path(result, target): Int32Array<ArrayBufferLike> | undefined

Defined in: packages/graph/src/path.ts:22

The vertices of the path a search found from a source to target, source first, or undefined when the search never reached target. O(path length).

PathSource

number

Int32Array<ArrayBufferLike> | undefined

With code INVALID_VERTEX when target is outside the result.

path(breadthFirstSearch(graph, { sources: [0] }), 5) // Int32Array [0, 2, 5]