next
|
previous
|
forward
|
backward
| up |
top
|
index
|
toc
|
Macaulay2 web site
Graphs
(missing documentation) ::
neighbors
neighbors -- returns the neighbors of a vertex in a graph
Synopsis
Usage:
N = neighbors(G,v)
Inputs:
G
,
an object of class
Graph
(missing documentation)
v
,
a
thing
Outputs:
N
,
a
set
, the neighbors of vertex v in graph G
Description
The neighbors of a vertex v are all the vertexSet of G adjacent to v. That is, if u is a neighbor to v, v,u is an edge of G.
i1 : G = graph({1,2,3,4},{{2,3},{3,4}});
i2 : neighbors(G,3) o2 = set {2, 4} o2 : Set
See also
nonneighbors
-- returns the non-neighbors of a vertex in a graph
Ways to use
neighbors
:
neighbors(Graph,Thing)
neighbors(MixedGraph,Thing)
(missing documentation)