clear_edges(g) --- delete all edges of g
0001 function clear_edges(g) 0002 % clear_edges(g) --- delete all edges of g 0003 0004 global GRAPH_MAGIC 0005 0006 n = nv(g); 0007 0008 if (issparse(g)) 0009 GRAPH_MAGIC.graphs{g.idx}.array = ... 0010 logical(sparse([],[],[],n,n,0)); 0011 else 0012 GRAPH_MAGIC.graphs{g.idx}.array = logical(zeros(n)); 0013 end