Home > matgraph > @graph > wheel.m

wheel

PURPOSE ^

wheel(g,n) --- overwrite g with a wheel graph on n vertices

SYNOPSIS ^

function wheel(g,n)

DESCRIPTION ^

 wheel(g,n) --- overwrite g with a wheel graph on n vertices
 if n is omitted, we use the number of vertices in g

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function wheel(g,n)
0002 % wheel(g,n) --- overwrite g with a wheel graph on n vertices
0003 % if n is omitted, we use the number of vertices in g
0004 
0005 if (nargin == 1)
0006     n = nv(g);
0007 end
0008 
0009 cycle(g,n-1);
0010 resize(g,n);
0011 for k=1:n-1
0012     add(g,k,n);
0013 end

Generated on Thu 13-Mar-2008 14:23:52 by m2html © 2003