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

NAME

6       dijkstra - single-source distance filter
7

SYNOPSIS

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

DESCRIPTION

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

SEE ALSO

35       gvpr(1), gvcolor(1), libgraph(3)
36
37
38
39                                 21 March 2001                     DIJKSTRA(1)
Impressum