Macaulay2 » Documentation
Packages » Graphs :: isLeaf
next | previous | forward | backward | up | index | toc

isLeaf -- determines whether a vertex is a leaf

Synopsis

Description

A vertex of a tree graph is a leaf if its degree is 1

i1 : G = graph({{1,2},{1,3},{3,4},{3,5}},EntryMode=>"edges");
i2 : isLeaf(G,2)

o2 = true

See also

Ways to use isLeaf :

For the programmer

The object isLeaf is a method function.