1
.TH adj_lists 1 "September 1995" "Scilab Group" "Scilab function"
4
adj_lists - computes adjacency lists
7
[lp,la,ls] = adj_lists(g)
8
[lp,la,ls] = adj_lists(directed,n,tail,head)
16
: integer, 0 (undirected graph) or 1 (directed graph)
19
: integer, the number of nodes of the graph
22
: the row vector of the numbers of the tail nodes of the graph (its size is the
23
number of edges of the graph)
26
: the row vector of the numbers of the head nodes of the graph (its size is the
27
number of edges of the graph)
30
: row vector, pointer array of the adjacency lists description of the graph
31
(its size is the number of nodes of the graph + 1)
34
: row vector, arc array of the adjacency lists description of the graph
35
(its size is the number of edges of the graph)
38
: row vector, node array of the adjacency lists description of the graph
39
(its size is the number of edges of the graph)
41
\fVadj_lists\fR computes the row vectors of the adjacency lists description of
43
It is also possible to give \fVadj_lists\fR the description of the
44
graph given by the number of nodes
45
\fVn\fR and the row vectors \fVtail\fR and \fVhead\fR.
48
ta=[2 3 3 5 3 4 4 5 8];
49
he=[1 2 4 2 6 6 7 7 4];
50
g=make_graph('foo',1,8,ta,he);
51
g('node_x')=[129 200 283 281 128 366 122 333];
52
g('node_y')=[61 125 129 189 173 135 236 249];
54
[lp,la,ls]=adj_lists(g)
55
[lp,la,ls]=adj_lists(1,g('node_number'),ta,he)
58
chain_struct, graph_2_mat