| Description of clear_edges |
clear_edges
PURPOSE 
clear_edges(g) --- delete all edges of g
SYNOPSIS 
function clear_edges(g)
DESCRIPTION 
CROSS-REFERENCE INFORMATION 
This function calls:
- issparse issparse(g) --- check if g's adjacency matrix is sparse
- nv nv(g) --- number of vertices in g
- sparse sparse(g) --- convert internal storage for g to sparse
This function is called by:
- cartesian cartesian(g,h1,h2) --- overwrite g with the product of h1 and h2
- circulant circulant(g,n,k) --- overwrite g with an n,k circulant graph
- cube cube(g,k) --- create a k-cube (default k = 3)
- dfstree dfstree(t,g,v) --- create a depth-first spanning tree of g
- dodecahedron dodecahedron(g) --- overwrite g with the dodecahedron graph
- hamiltonian_cycle hamiltonian_cycle(g) --- find a Hamiltonian cycle in g (if one exists)
- icosahedron icosahedron(g) --- overwrite g with the icosahedron graph
- interval_graph interval_graph(g,ilist) --- create an interval graph
- line_graph line_graph(g,h) --- set g to be the line graph of h
- octahedron octahedron(g) --- overwrite g with the octahedron graph, K(2,2,2)
- random_regular random_regular(g,n,k) --- create a random regular graph
- random_tree random_tree(t,n) --- overwrite t with a random tree on n vertices
- selective selective(g,n,n0,d) --- selective attachment random graph
SOURCE CODE 
0001 function clear_edges(g)
0002
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
Generated on Thu 13-Mar-2008 14:23:52 by m2html © 2003
|
|