next
|
previous
|
forward
|
backward
| up |
top
|
index
|
toc
|
Macaulay2 web site
Graphs
(missing documentation) ::
pathGraph
pathGraph -- A method that makes a path graph
Synopsis
Usage:
P = pathGraph n
Inputs:
n
,
an
integer
Outputs:
P
,
an object of class
Graph
(missing documentation)
, the path grah of n vertices
Description
A path graph on n vertices is a cycle graph of n vertices minus one edge.
i1 : pathGraph 5 o1 = Graph{0 => {1} } 1 => {0, 2} 2 => {1, 3} 3 => {2, 4} 4 => {3} o1 : Graph
See also
cycleGraph
-- Constructs a cycle graph
Ways to use
pathGraph
:
pathGraph(ZZ)