UndirectedEdge

UndirectedEdge[u,v] or uv

represents an undirected edge of a graph with vertices u and v.

Details

Examples

open allclose all

Basic Examples  (5)

Build a graph with undirected edges:

In[1]:=
Click for copyable input
Out[1]=

List of edges:

In[2]:=
Click for copyable input
Out[2]=

Use ue to enter directly:

In[1]:=
Click for copyable input
Out[1]=
In[2]:=
Click for copyable input
Out[2]=

Enter using a two-way rule <->:

In[1]:=
Click for copyable input
Out[1]=

The two-way rules are converted to undirected edges:

In[2]:=
Click for copyable input
Out[2]=

Style and label individual edges:

In[1]:=
Click for copyable input
Out[1]=

StandardForm formatting:

In[1]:=
Click for copyable input
Out[1]=

Scope  (6)

Properties & Relations  (3)

See Also

DirectedEdge  Graph  EdgeList  EdgeCount  TwoWayRule

Introduced in 2010
(8.0)