spatgraphs-shortestPath {spatgraphs}R Documentation

Shortest path between nodes i and j

Description

Find the shortest edgeconnected path between two given nodes/points with indices i and j (in pp).

Arguments

pp Point pattern, as ppp in spatstat.
i The start node of the path to find.
j The target node of the path to find.
g=NULL Graph which defines the edges. If NULL computes one for given additional parameters.
... Passed on to spatgraph if g is not given.

Details

Date: 2008-09-25
License: GPL v2 or later

Make sure the graph is symmetric. Value is the sum of Euclidian lenghts of the edges in the shortest path. The algorithm is Dijkstra's algorithm.

References

E. W. Dijkstra: A note on two problems in connexion with graphs. 'Numerische Mathematik', 1 (1959), p. 269-271.

http://en.wikipedia.org/wiki/Dijkstra's_algorithm


[Package spatgraphs version 2.32 Index]