AdjacencyList

AdjacencyList[g,v]

gives a list of vertices adjacent to vertex v.

AdjacencyList[g,patt]

gives a list of vertices adjacent to vertices that match the pattern patt.

AdjacencyList[g,patt,d]

gives a list of vertices that are at distance at most d.

AdjacencyList[{vw,},]

uses rules vw to specify the graph g.

Details

Examples

open allclose all

Basic Examples  (3)

A list of vertices adjacent to the vertex 1:

Find all vertices adjacent to vertices that match a pattern:

Highlight adjacent vertices:

Scope  (6)

AdjacencyList works with undirected graphs:

Directed graphs:

Use rules to specify the graph:

Use patterns to select a subset of vertices:

Find vertices at a distance 2 from vertex 1:

AdjacencyList works with large graphs:

Applications  (1)

A family network consisting of the closest relatives, including parents, siblings, and children:

Immediate family members of Nancy:

Highlight:

Properties & Relations  (2)

AdjacencyList can be found using NeighborhoodGraph:

AdjacencyList can be found using IncidenceList:

Wolfram Research (2012), AdjacencyList, Wolfram Language function, https://reference.wolfram.com/language/ref/AdjacencyList.html (updated 2018).

Text

Wolfram Research (2012), AdjacencyList, Wolfram Language function, https://reference.wolfram.com/language/ref/AdjacencyList.html (updated 2018).

BibTeX

@misc{reference.wolfram_2021_adjacencylist, author="Wolfram Research", title="{AdjacencyList}", year="2018", howpublished="\url{https://reference.wolfram.com/language/ref/AdjacencyList.html}", note=[Accessed: 24-September-2021 ]}

BibLaTeX

@online{reference.wolfram_2021_adjacencylist, organization={Wolfram Research}, title={AdjacencyList}, year={2018}, url={https://reference.wolfram.com/language/ref/AdjacencyList.html}, note=[Accessed: 24-September-2021 ]}

CMS

Wolfram Language. 2012. "AdjacencyList." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2018. https://reference.wolfram.com/language/ref/AdjacencyList.html.

APA

Wolfram Language. (2012). AdjacencyList. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/AdjacencyList.html