gives the graph neighborhood of a vertex v in the graph g.
gives the graph neighborhood of the ai that can be vertices, edges, or subgraphs of g.
gives the graph neighborhood of the vertices and edges that match the pattern patt.
gives the neighborhood up to distance d.
uses rules vw to specify the graph g.
Details and Options
- The neighborhood graph for a vertex v is given by vertices adjacent to v and the edges connecting them.
- The neighborhood graph for an edge e is the neighborhood graph for the vertices of e.
- The neighborhood graph for a subgraph h is the neighborhood graph for the vertices in h.
- The neighborhood graph at distance d is the neighborhood graph for the vertices of the neighborhood graph at distance d-1.
- The default value for d is 1.
- NeighborhoodGraph works with undirected graphs, directed graphs, multigraphs, and mixed graphs.
Examplesopen allclose all
Basic Examples (2)
Properties & Relations (2)
Use Subgraph to find the neighborhood graph of a set of vertices:
Wolfram Research (2010), NeighborhoodGraph, Wolfram Language function, https://reference.wolfram.com/language/ref/NeighborhoodGraph.html (updated 2015).
Wolfram Language. 2010. "NeighborhoodGraph." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2015. https://reference.wolfram.com/language/ref/NeighborhoodGraph.html.
Wolfram Language. (2010). NeighborhoodGraph. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/NeighborhoodGraph.html