GraphTheory[Neighborhood]
|
Calling Sequence
|
|
Neighborhood(G, v, s)
|
|
Parameters
|
|
G
|
-
|
graph
|
v
|
-
|
vertex
|
s
|
-
|
(optional) the type of neighborhood, either open or closed
|
|
|
|
|
Description
|
|
•
|
Neighborhood('G','v') returns the list of neighbors of v in G. If G is directed the directions of arcs are ignored. An optional third argument, either open or closed, specifies whether to include the vertex v. The default is open, which does not include v.
|
|
|
Examples
|
|
>
|
|
>
|
|
>
|
|
| (1) |
>
|
|
| (2) |
>
|
|
| (3) |
|
|
Download Help Document
Was this information helpful?