summaryrefslogtreecommitdiff
path: root/doc/dijkstra.1
blob: 909db366e1923d69d0c726c309b10fee128aeaae (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
.\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3
.
.TH "DIJKSTRA" "1" "September 2017" "www.complex-networks.net" "www.complex-networks.net"
.
.SH "NAME"
\fBdijkstra\fR \- Compute the distance between one node and all the other nodes of a weighted graph
.
.SH "SYNOPSIS"
\fBdijkstra\fR \fIgraph_in\fR \fInode\fR
.
.SH "DESCRIPTION"
\fBdijkstra\fR computes the distance (and the shortest paths) between a given node and all the other nodes of an undirected weighted graph provided as input\. The program implements the Dijkstra\'s algorithm\.
.
.SH "PARAMETERS"
.
.TP
\fIgraph_in\fR
input graph (edge list) if equal to \fB\-\fR (dash), read the edge list from STDIN\.
.
.TP
\fInode\fR
The label of the node from which distances are to be computed
.
.SH "OUTPUT"
\fBdijkstra\fR prints on the standard output the distances betwen \fInode\fR and all the other nodes of the graph, in the format:
.
.IP "" 4
.
.nf

d0 d1 d2 d3\.\.\.\.\.
.
.fi
.
.IP "" 0
.
.P
where \fBd0\fR is the distance to node \fB0\fR, \fBd1\fR is the distance to node \fB1\fR, and so forth\.
.
.SH "EXAMPLES"
The following command:
.
.IP "" 4
.
.nf

      $ dijkstra US_airports\.net 0
      0 4784 5662 6603 11097 7470 4472 \.\.\.\.
      $
.
.fi
.
.IP "" 0
.
.P
will show on output the distances between node 0 and all the other nodes in the graph \fBUS_airports\.net\fR (the US air transportation network)\.
.
.SH "SEE ALSO"
shortest(1)
.
.SH "REFERENCES"
.
.IP "\(bu" 4
E\. W\. Dijkstra\. "A Note on Two Problems in Connexion with Graphs"\. Num\. Math\. 1 (1959), 269\-271\.
.
.IP "\(bu" 4
V\. Latora, V\. Nicosia, G\. Russo, "Complex Networks: Principles, Methods and Applications", Chapter 10, Cambridge University Press (2017)
.
.IP "\(bu" 4
V\. Latora, V\. Nicosia, G\. Russo, "Complex Networks: Principles, Methods and Applications", Appendix 6, Cambridge University Press (2017)
.
.IP "" 0
.
.SH "AUTHORS"
(c) Vincenzo \'KatolaZ\' Nicosia 2009\-2017 \fB<v\.nicosia@qmul\.ac\.uk>\fR\.