resize resize(g,n) --- change the number of vertices in g to n
This function is called by:
SOURCE CODE
0001 function random_tree(t,n)
0002 % random_tree(t,n) --- overwrite t with a random tree on n vertices
0003
0004 resize(t,n);
0005 clear_edges(t);
0006
0007 for v=2:n
0008 u = floor(rand(1)*(v-1))+1;
0009 add(t,u,v);
0010 end
0011
0012 p = randperm(n);
0013 renumber(t,p);