1
mat_2_graph Scilab Group Scilab function mat_2_graph
3
mat_2_graph - graph from node-arc or node-node incidence matrix
6
g = mat_2_graph(a,directed,[mat])
8
a : sparse node-arc or node-node incidence matrix
11
: integer, 0 (undirected graph) or 1 (directed graph)
14
: optional string, 'node-arc' or 'node-node' matrix
19
mat_2_graph computes the graph g corresponding to the node-arc or the
20
node-node incidence matrix a. Note that a checking is made to insure that
21
a is a sparse node-arc or node-node incidence matrix of a directed
22
(directed = 1) or undirected (directed = 0) graph. If the optional
23
argument mat is omitted or is the string 'node-arc', a must be a
24
node-arc matrix. If mat is the string 'node-node', a must be a node-node
28
g=load_graph(SCI+'/demos/metanet/colored');
32
g1('node_x')=g('node_x'); g1('node_y')=g('node_y');
34
a=graph_2_mat(g,'node-node');
35
g1=mat_2_graph(a,1,'node-node');
36
g1('node_x')=g('node_x'); g1('node_y')=g('node_y');
39
adj_lists, chain_struct, graph_2_mat