Computes and returns a sequence of nodes that represents the lowest-cost graph traversal from the specified node to this node.
- iOS 9.0+
- macOS 10.11+
- Mac Catalyst 13.0+
- tvOS 9.0+
The origin node from which to attempt traversal of the graph.
An array of nodes representing a path through the graph in start to end order, or an empty array if no path exists between the specified nodes.
This method is equivalent to the
find method, but finds a path from the specified node to this node, rather than the other way around. Connections in a graph are directional—that is, a connection from Node A to Node B indicates only that travel is possible from A to B, and indicating that travel from B to A is also possible requires a separate connection. Therefore, calling the
find methods with the same pair of nodes might not always return the same paths.