EdgeTags
Examples
open all close allBasic Examples (1)
The list of edge tags for an explicitly constructed graph:
Graph[{1Overscript[, a]2, 1Overscript[, b]3, 2Overscript[, c]3}]EdgeTags[%]The list of edge tags between 1 and 2:
Graph[{1Overscript[, a]2, 1Overscript[, b]2, 1Overscript[, c]3, 2Overscript[, d]3}]EdgeTags[%, {1, 2}]Scope (5)
EdgeTags works with undirected graphs:
EdgeTags[[image]]EdgeTags[[image]]EdgeTags[[image]]EdgeTags[[image]]EdgeTags works with large graphs:
g = IndexEdgeTaggedGraph[GridGraph[{10, 10, 10, 10}]];Timing[EdgeTags[g]//Short]Properties & Relations (4)
EdgeCount can be found using EdgeTags in a tagged graph:
g = EdgeTaggedGraph[{12, 23, 31}]EdgeCount[g]Length[EdgeTags[g]]Tags in EdgeTags are given in the same order their edges are entered for Graph:
g = Graph[{2Overscript[, a]3, 1Overscript[, b]2, 3Overscript[, c]1, 4Overscript[, d]1}]EdgeTags[%]EdgeTags gives an empty list for input that is not tagged graphs:
g = GridGraph[{2, 3}]EdgeTaggedGraphQ[g]EdgeTags[g]EdgeTags can be found using EdgeList in IndexEdgeTaggedGraph:
g = IndexEdgeTaggedGraph[WheelGraph[8]]EdgeTags[g]Last /@ EdgeList[g]Possible Issues (2)
Null is used to indicate the absence of a tag in an edge:
g = Graph[{UndirectedEdge[1, 2, 1], UndirectedEdge[2, 3], UndirectedEdge[3, 1]}]EdgeTags[g]EdgeTags gives an empty list for a graph with no edge tags:
g = CompleteGraph[5]EdgeTags[g]Related Guides
History
Text
Wolfram Research (2020), EdgeTags, Wolfram Language function, https://reference.wolfram.com/language/ref/EdgeTags.html.
CMS
Wolfram Language. 2020. "EdgeTags." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/EdgeTags.html.
APA
Wolfram Language. (2020). EdgeTags. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/EdgeTags.html
BibTeX
@misc{reference.wolfram_2026_edgetags, author="Wolfram Research", title="{EdgeTags}", year="2020", howpublished="\url{https://reference.wolfram.com/language/ref/EdgeTags.html}", note=[Accessed: 12-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_edgetags, organization={Wolfram Research}, title={EdgeTags}, year={2020}, url={https://reference.wolfram.com/language/ref/EdgeTags.html}, note=[Accessed: 12-June-2026]}