summaryrefslogtreecommitdiff
path: root/doc/node_components.1
blob: b96c686195e43a491db52fda1f0d25eb13523e3a (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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
.\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3
.
.TH "NODE_COMPONENTS" "1" "September 2017" "www.complex-networks.net" "www.complex-networks.net"
.
.SH "NAME"
\fBnode_components\fR \- Find the components associated to a specific node
.
.SH "SYNOPSIS"
\fBnode_components\fR \fIgraph_in\fR \fInode\fR [\fIcomponent\fR [SHOW]]
.
.SH "DESCRIPTION"
\fBnode_components\fR finds the components associated to the node \fInode\fR of the graph \fIgraph_in\fR provided as input, and prints on output the size of those components\. The value of the third parameter \fIcomponent\fR can be set to \fBIN\fR, \fBOUT\fR, \fBINOUT\fR, \fBSSC\fR, \fBWCC\fR, or \fBALL\fR\. According to the value of \fIcomponent\fR, the program will compute the IN\-component (\fBIN\fR), the OUT\-component (\fBOUT\fR), both the IN\- and OUT\-component (\fBINOUT\fR), the strongly connected components (\fBSCC\fR), or the weakly\-connected component (\fBWCC\fR) to which \fInode\fR belongs\. If the third parameter is omitted or equal to \fBALL\fR, then \fBnode_components\fR computes all the components associated to \fInode\fR\. If \fBSHOW\fR is specified as the fourth parameter, the program also shows the list of nodes which belong to each of the required components\.
.
.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\.
.
.TP
\fIcomponent\fR
the component to compute\. Can be set to one of \fBIN\fR (IN\-component), \fBOUT\fR (OUT\-component), \fBINOUT\fR (both the IN\- and the OUT\-component), \fBSSC\fR (strongly connected component), \fBWCC\fR (weakly connected component), or \fBALL\fR (all the above)\. If \fIcomponent\fR is not set, compute all the components\.
.
.TP
SHOW
If the (optional) fourth parameter is equal to \fBSHOW\fR, the program will dump on output the list of all the nodes belonging to each component\.
.
.SH "OUTPUT"
\fBnode_components\fR prints on the standard output the size of the required components, one per line, in the format:
.
.IP "" 4
.
.nf

comp_type_1: size_1
comp_type_2: size_2
\.\.\.\.\.
.
.fi
.
.IP "" 0
.
.P
where \fBcomp_type_1\fR is the type of component (one of \fBIN\fR, \fBOUT\fR, \fBSCC\fR, or \fBWCC\fR) and \fBsize_1\fR is its size, and so on\. Notice that the sizes are not sorted\. If \fBSHOW\fR is given, the program shows the list of nodes belonging to each component, in the format:
.
.IP "" 4
.
.nf

comp_type_1: size_1 node_1 node_2 node_3 \.\.\.
comp_type_2: size_2 node_1 node_2 node_3 \.\.\.
.
.fi
.
.IP "" 0
.
.SH "EXAMPLES"
We can use \fBnode_components\fR to compute the IN\-component of a specific node\. For instance, the command:
.
.IP "" 4
.
.nf

      $ node_components web\-NotreDame\.net 2711 IN
      IN: 53968
      $
.
.fi
.
.IP "" 0
.
.P
computes the size of the IN\-component of node 2711 in the graph \fBwww_nd\.net\fR (WWW Notre Dame)\. This component contains 53968 nodes\. Similarly:
.
.IP "" 4
.
.nf

      $ node_components web\-NotreDame\.net 2711 OUT SHOW
      OUT: 21 559 2711 2712 2713 2714 2715 2716 \.\.\. 33271 33272
      $
.
.fi
.
.IP "" 0
.
.P
computes and shows the OUT\-component of node 2711, which contains 21 nodes, including node 2711\. Finally, we can obtain the size of all the components associated to node 2711 by running:
.
.IP "" 4
.
.nf

      $ node_components web\-NotreDame\.net 2711
      IN: 53986
      OUT: 21
      WCC: 325729
      SCC: 18
      $
.
.fi
.
.IP "" 0
.
.P
In this case, the IN\-component of node 2711 contains 53986 nodes, the OUT\-component contains 21 nodes, the weakly connected components contains 325729 nodes (the whole graph), and the strongly connected component contains 18 nodes\. It is also possible to show the list of nodes belonging to each component by providing \fBSHOW\fR as fourth parameter\. IN this case, it is better to save the output of \fBnode_components\fR into a file, e\.g\. by using:
.
.IP "" 4
.
.nf

      $ node_components web\-NotreDame\.net 2711 ALL SHOW > web\-NotreDame\.net_components_2711
.
.fi
.
.IP "" 0
.
.SH "SEE ALSO"
components(1), strong_conn(1), largest_component(1)
.
.SH "REFERENCES"
.
.IP "\(bu" 4
V\. Latora, V\. Nicosia, G\. Russo, "Complex Networks: Principles, Methods and Applications", Chapter 6, Cambridge University Press (2017)
.
.IP "\(bu" 4
V\. Latora, V\. Nicosia, G\. Russo, "Complex Networks: Principles, Methods and Applications", Appendix 8, Cambridge University Press (2017)
.
.IP "" 0
.
.SH "AUTHORS"
(c) (c) Vincenzo \'KatolaZ\' Nicosia 2009\-2017 \fB<v\.nicosia@qmul\.ac\.uk>\fR\.