Code covered by the BSD License  

Highlights from
Matgraph

from Matgraph by Ed Scheinerman
Toolbox for working with simple, undirected graphs

Description of cycle
Home > matgraph > @graph > cycle.m

cycle

PURPOSE ^

cycle(g,n) --- create a cycle graph on n vertices

SYNOPSIS ^

function cycle(g,n)

DESCRIPTION ^

 cycle(g,n) --- create a cycle graph on n vertices

CROSS-REFERENCE INFORMATION ^

This function calls:
  • add add --- add edge(s) to the graph
  • embed embed --- create an embedding for a graph
  • path path(g,n) --- make g a path on n vertices
This function is called by:
  • mobius mobius(g,nverts) --- create a Mobius ladder graph
  • wheel wheel(g,n) --- overwrite g with a wheel graph on n vertices

SOURCE CODE ^

0001 function cycle(g,n)
0002 % cycle(g,n) --- create a cycle graph on n vertices
0003 
0004 global GRAPH_MAGIC
0005 
0006 path(g,n);
0007 add(g,1,n);
0008 embed(g);

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

Contact us at files@mathworks.com