graph from node-arc or node-node incidence matrix
g = mat_2_graph(a,directed,[mat])
sparse node-arc or node-node incidence matrix
integer, 0 (undirected graph) or 1 (directed graph)
optional string, 'node-arc'
or
'node-node'
matrix
mat_2_graph
computes the graph
g
corresponding to the node-arc or the node-node
incidence matrix a
. Note that a checking is made to
insure that a
is a sparse node-arc or node-node
incidence matrix of a directed (directed = 1
) or
undirected (directed = 0
) graph. If the optional
argument mat
is omitted or is the string
'node-arc'
, a must be a node-arc matrix. If
mat
is the string 'node-node'
, a
must be a node-node matrix.