Provided by: graphviz_2.40.1-7build1_amd64

**NAME**

dijkstra - single-source distance filter

**SYNOPSIS**

dijkstra[-adp?] [sourcenodefile]

**DESCRIPTION**

dijkstrareads a stream of graphs and for each computes the distance of every node fromsourcenode.Edge length is given in thelenattribute, and the default is 1. Thedistattribute of every node is set to its distance fromsourcenode.If the-pflag is used, theprevattribute of each node reachable fromsourcenodeis set to the name of the previous node on a shortest path. The graph attributemaxdistis set to the maximumdistof all nodes in the graph. If the-dflag is used, the graph is treated as directed and only forward edges are used. By default, if the graph is disconnected, thedistattribute of nodes unreachable fromsourcenodeare left untouched, andmaxdistis set to the maximum of any previous value and the largest distance recorded in this run. On the other hand, if the-aflag is used, thedistattribute of an unreachable node is assigned a very large value, andmaxdistrecords the maximum distance found in the component containingsourcenode.Any number ofsourcenodefilepairs may be given. If the lastfileis missing,stdinis used. All output is written tostdout. In a typical application,distandmaxdistcan drive a downstream calculation of color or some other attribute.

**SEE** **ALSO**

gvpr(1), gvcolor(1), libgraph(3) 21 March 2001 DIJKSTRA(1)