Man Scilab

adj_lists
Scilab function

adj_lists - computes adjacency lists

Calling Sequence

[lp,la,ls] = adj_lists(g)
[lp,la,ls] = adj_lists(directed,n,tail,head)

Parameters

Description

adj_lists computes the row vectors of the adjacency lists description of the graph g . It is also possible to give adj_lists the description of the graph given by the number of nodes n and the row vectors tail and head .

Examples


ta=[2 3 3 5 3 4 4 5 8];
he=[1 2 4 2 6 6 7 7 4];
g=make_graph('foo',1,8,ta,he);
g('node_x')=[129 200 283 281 128 366 122 333];
g('node_y')=[61 125 129 189 173 135 236 249];
show_graph(g);
[lp,la,ls]=adj_lists(g)
[lp,la,ls]=adj_lists(1,g('node_number'),ta,he)
 
  

See Also

chain_struct ,   graph_2_mat ,  

Back