next
|
previous
|
forward
|
backward
| up |
top
|
index
|
toc
|
Macaulay2 web site
Graphs
(missing documentation) ::
leaves
leaves -- lists the leaves of a tree graph
Synopsis
Usage:
L = leaves G
Inputs:
G
,
an object of class
Graph
(missing documentation)
Outputs:
L
,
a
list
, list of leaves of a tree graph
Description
A vertex of a tree graph is a leaf if the degree of the vertex is 1
i1 : G = graph({{1,2},{1,3},{3,4},{3,5}},EntryMode=>"edges");
i2 : leaves G;
See also
isForest
-- determines whether a graph is a forest
isLeaf
-- determines whether a vertex is a leaf
isTree
-- determines whether a graph is a tree
Ways to use
leaves
:
leaves(Graph)