The non-neighbors of a vertex v are all the vertexSet of G that are not adjacent to v. That is, if u is a non-neighbor to v, {u,v} is not an edge in G.
i1 : G = graph({1,2,3,4},{{2,3},{3,4}});
|
i2 : nonneighbors(G,2)
o2 = set {1, 4}
o2 : Set
|
The object nonneighbors is a method function.