1
.TH chain_struct 1 "September 1996" "Scilab Group" "Scilab function"
4
chain_struct - chained structure from adjacency lists of a graph
7
[fe,che,fn,chn] = chain_struct(g)
8
[fe,che,fn,chn] = chain_struct(lp,la,ls)
16
: row vector, pointer array of the adjacency lists description of the graph
17
(its size is the number of nodes of the graph + 1)
20
: row vector, arc array of the adjacency lists description of the graph
21
(its size is the number of edges of the graph)
24
: row vector, node array of the adjacency lists description of the graph
25
(its size is the number of edges of the graph)
28
: row vector of the numbers of the first edges starting from nodes
29
(its size is the number of nodes of the graph)
32
: row vector of the numbers of the chained edges
33
(its size is the number of edges of the graph)
36
: row vector of the numbers of the first nodes reached by the edges of
37
\fVfe\fR (its size is the number of nodes of the graph)
40
: row vector of the nodes reached by the edges of \fVche\fR
42
\fVchain_struct\fR computes the row vectors of the edge chained structure
43
description of the graph \fVg\fR.
44
It is also possible to give directly \fVchain_struct\fR the adjacency lists of
45
the graph. This is more efficient if the adjacency lists are already
46
available since \fVchain_struct\fR uses them to make computations.
48
The vectors \fVfe\fR, \fVche\fR, \fVfn\fR and \fVchn\fR describe the
49
chained structure in the following way:
51
\fVfe(i))\fR is the number of the first edge starting from node i
53
\fVche(fe(i))\fR is the number of the second edge starting from
54
node i, \fVche(che(fe(i)))\fR is the number of the third edge starting from
55
node i and so on until the value is 0
57
\fVfn(i)\fR is the number of the first node reached from node i
59
\fVch(i)\fR is the number of the node reached by edge \fVche(i)\fR.
62
ta=[1 1 2 3 5 4 6 7 7 3 3 8 8 5];
63
he=[2 3 5 4 6 6 7 4 3 2 8 1 7 4];
64
g=make_graph('foo',1,8,ta,he);
65
g('node_x')=[116 231 192 323 354 454 305 155];
66
g('node_y')=[118 116 212 219 117 185 334 316];
68
[fe,che,fn,chn] = chain_struct(g)
71
adj_lists, graph_2_mat