IncidenceList[g,v]
gives a list of edges incident to vertex v.
IncidenceList[g,patt]
gives a list of edges incident to vertices that match the pattern patt.
IncidenceList[g,patt,d]
gives a list of incident edges d steps away.
IncidenceList[{vw,…},…]
uses rules vw to specify the graph g.
IncidenceList
IncidenceList[g,v]
gives a list of edges incident to vertex v.
IncidenceList[g,patt]
gives a list of edges incident to vertices that match the pattern patt.
IncidenceList[g,patt,d]
gives a list of incident edges d steps away.
IncidenceList[{vw,…},…]
uses rules vw to specify the graph g.
Details
- IncidenceList is typically used to represent the incidence (or connection) between vertices and edges.
- IncidenceList returns the list of edges in the order used by the graph g.
Examples
open all close allBasic Examples (3)
A list of edges incident to vertex 1:
IncidenceList[[image], 1]Find all vertices adjacent to vertices that match the pattern:
IncidenceList[[image], _ ? (# < 3&)]g = GridGraph[{9, 9}, VertexSize -> Medium, VertexStyle -> {41 -> Blue}];Table[HighlightGraph[g, IncidenceList[g, 41, i]], {i, 3}]Scope (6)
IncidenceList works with undirected graphs:
IncidenceList[[image], 1]IncidenceList[[image], 1]Use rules to specify the graph:
IncidenceList[{1 -> 3, 2 -> 1, 3 -> 6, 4 -> 6, 1 -> 5, 5 -> 4, 6 -> 1}, 1]Use patterns to obtain edges incident to a selected subset of vertices:
IncidenceList[[image], Except[_Integer]]Obtain incident edges d steps away from a vertex:
IncidenceList[[image], 1, 2]IncidenceList works with large graphs:
g = GridGraph[{10, 10, 10, 10}];IncidenceList[g, 50]//TimingProperties & Relations (2)
IncidenceList can be found using NeighborhoodGraph:
g = [image];IncidenceList[g, 1]EdgeList[NeighborhoodGraph[g, 1], Except[1]]AdjacencyList can be found using IncidenceList:
g = [image];AdjacencyList[g, 2]DeleteCases[Flatten[List@@@IncidenceList[g, 2]], 2]Related Guides
Text
Wolfram Research (2012), IncidenceList, Wolfram Language function, https://reference.wolfram.com/language/ref/IncidenceList.html (updated 2015).
CMS
Wolfram Language. 2012. "IncidenceList." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2015. https://reference.wolfram.com/language/ref/IncidenceList.html.
APA
Wolfram Language. (2012). IncidenceList. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/IncidenceList.html
BibTeX
@misc{reference.wolfram_2026_incidencelist, author="Wolfram Research", title="{IncidenceList}", year="2015", howpublished="\url{https://reference.wolfram.com/language/ref/IncidenceList.html}", note=[Accessed: 12-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_incidencelist, organization={Wolfram Research}, title={IncidenceList}, year={2015}, url={https://reference.wolfram.com/language/ref/IncidenceList.html}, note=[Accessed: 12-June-2026]}