1DIJKSTRA(1)                 General Commands Manual                DIJKSTRA(1)
2
3
4

NAME

6       dijkstra - single-source distance filter for Graphviz
7

SYNOPSIS

9       dijkstra [ -adp?  ] [ sourcenode file ]
10

DESCRIPTION

12       dijkstra  reads a stream of Graphviz formatted graphs and for each com‐
13       putes the distance of every node from sourcenode.  Edge length is given
14       in  the  len  attribute,  and  the default is 1.  The dist attribute of
15       every node is set to its distance from sourcenode.  If the -p  flag  is
16       used,  the prev attribute of each node reachable from sourcenode is set
17       to the name of the  previous  node  on  a  shortest  path.   The  graph
18       attribute maxdist is set to the maximum dist of all nodes in the graph.
19
20       If  the -d flag is used, the graph is treated as directed and only for‐
21       ward edges are used.
22
23       By default, if the graph is disconnected, the dist attribute  of  nodes
24       unreachable  from  sourcenode are left untouched, and maxdist is set to
25       the maximum of any previous value and the largest distance recorded  in
26       this run. On the other hand, if the -a flag is used, the dist attribute
27       of an unreachable node is assigned a  very  large  value,  and  maxdist
28       records   the  maximum  distance  found  in  the  component  containing
29       sourcenode.
30
31       Any number of sourcenode file pairs may be given.  If the last file  is
32       missing, stdin is used.  All output is written to stdout.
33
34       In  a typical application, dist and maxdist can drive a downstream cal‐
35       culation of color or some other attribute.
36

SEE ALSO

38       gvpr(1), gvcolor(1), libgraph(3)
39
40
41
42                                 21 March 2001                     DIJKSTRA(1)
Impressum