annotate toolboxes/graph_visualisation/share/man/man1/dijkstra.1 @ 0:cc4b1211e677 tip

initial commit to HG from Changeset: 646 (e263d8a21543) added further path and more save "camirversion.m"
author Daniel Wolff
date Fri, 19 Aug 2016 13:07:06 +0200
parents
children
rev   line source
Daniel@0 1 .TH DIJKSTRA 1 "21 March 2001"
Daniel@0 2 .SH NAME
Daniel@0 3 dijkstra \- single-source distance filter
Daniel@0 4 .SH SYNOPSIS
Daniel@0 5 .B dijkstra
Daniel@0 6 [
Daniel@0 7 .B \-ap?
Daniel@0 8 ]
Daniel@0 9 [
Daniel@0 10 .I sourcenode file
Daniel@0 11 ]
Daniel@0 12 .SH DESCRIPTION
Daniel@0 13 .B dijkstra
Daniel@0 14 reads a stream of graphs and for each computes the distance of every
Daniel@0 15 node from
Daniel@0 16 .I sourcenode.
Daniel@0 17 Edge length is given in the
Daniel@0 18 .I len
Daniel@0 19 attribute, and the default is 1. The
Daniel@0 20 .I dist
Daniel@0 21 attribute of every node is set to its distance from
Daniel@0 22 .I sourcenode.
Daniel@0 23 If the \fB-p\fP flag is used, the
Daniel@0 24 .I prev
Daniel@0 25 attribute of each node reachable from
Daniel@0 26 .I sourcenode
Daniel@0 27 is set to the name of the previous node on a shortest path.
Daniel@0 28 The graph attribute
Daniel@0 29 .I maxdist
Daniel@0 30 is set to the maximum
Daniel@0 31 .I dist
Daniel@0 32 of all nodes in the graph.
Daniel@0 33 .P
Daniel@0 34 By default, if the graph is disconnected, the
Daniel@0 35 .I dist
Daniel@0 36 attribute of nodes unreachable from
Daniel@0 37 .I sourcenode
Daniel@0 38 are left untouched, and
Daniel@0 39 .I maxdist
Daniel@0 40 is set to the maximum of any previous value and the largest
Daniel@0 41 distance recorded in this run. On the other hand, if
Daniel@0 42 the \fB-a\fP flag is used, the
Daniel@0 43 .I dist
Daniel@0 44 attribute of an unreachable node is assigned a very large value,
Daniel@0 45 and
Daniel@0 46 .I maxdist
Daniel@0 47 records the maximum distance found in the component containing
Daniel@0 48 .I sourcenode.
Daniel@0 49 .P
Daniel@0 50 Any number of
Daniel@0 51 .I sourcenode file
Daniel@0 52 pairs may be given.
Daniel@0 53 If the last
Daniel@0 54 .I file
Daniel@0 55 is missing, \fBstdin\fP is used.
Daniel@0 56 All output is written to \fBstdout\fP.
Daniel@0 57 .P
Daniel@0 58 In a typical application,
Daniel@0 59 .I dist
Daniel@0 60 and
Daniel@0 61 .I maxdist
Daniel@0 62 can drive a downstream calculation of color or some other attribute.
Daniel@0 63 .SH "SEE ALSO"
Daniel@0 64 gvpr(1), gvcolor(1), libgraph(3)