Macaulay2 » Documentation
Packages » EdgeIdeals :: neighbors
next | previous | forward | backward | up | index | toc

neighbors -- returns the neighbors of a vertex or list of vertices



The vertices adjacent to vertex V are called the neighbors of V. The neighbors of a list of vertices L are those vertices that are not in L and are adjacent to a vertex in L.

i1 : R = QQ[a..f];
i2 : G = graph {a*b, a*c, a*d, d*e, d*f};
i3 : neighbors(G,a)

o3 = {b, c, d}

o3 : List
i4 : neighbors(G,0)

o4 = {b, c, d}

o4 : List
i5 : neighbors(G,{a,d})

o5 = {b, c, e, f}

o5 : List
i6 : neighbors(G,{0,3})

o6 = {b, c, e, f}

o6 : List

See also

Ways to use neighbors :

For the programmer

The object neighbors is a method function.