UndirectedEdge

UndirectedEdge[u,v] or uv

represents an undirected edge between u and v.

UndirectedEdge[u,v,t] or uv

represents an undirected edge between u and v with tag t.

Details

Examples

open allclose all

Basic Examples  (5)

Build a graph with undirected edges:

List of edges:

Use ue to enter directly:

Enter using a two-way rule <->:

The two-way rules are converted to undirected edges:

Style and label individual edges:

StandardForm formatting:

Scope  (6)

Use wrappers to specify edge properties, including style:

Labels:

Interactive behavior:

Wrappers can be used to specify any supported edge annotation:

As well as new ones:

Use UndirectedEdge to specify individual edges for options, including style:

Labels:

Use a list of edges to indicate which edges to highlight:

A subgraph:

Use edge patterns to select and count edges:

Properties & Relations  (3)

Use UndirectedEdge to construct undirected graphs:

Tree graphs:

Path graphs:

Inside graph constructors, TwoWayRule[a,b] is converted to UndirectedEdge[a,b]:

The adjacency matrix of an undirected graph is symmetric:

Wolfram Research (2010), UndirectedEdge, Wolfram Language function, https://reference.wolfram.com/language/ref/UndirectedEdge.html (updated 2020).

Text

Wolfram Research (2010), UndirectedEdge, Wolfram Language function, https://reference.wolfram.com/language/ref/UndirectedEdge.html (updated 2020).

CMS

Wolfram Language. 2010. "UndirectedEdge." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2020. https://reference.wolfram.com/language/ref/UndirectedEdge.html.

APA

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

BibTeX

@misc{reference.wolfram_2024_undirectededge, author="Wolfram Research", title="{UndirectedEdge}", year="2020", howpublished="\url{https://reference.wolfram.com/language/ref/UndirectedEdge.html}", note=[Accessed: 22-November-2024 ]}

BibLaTeX

@online{reference.wolfram_2024_undirectededge, organization={Wolfram Research}, title={UndirectedEdge}, year={2020}, url={https://reference.wolfram.com/language/ref/UndirectedEdge.html}, note=[Accessed: 22-November-2024 ]}