Given:
theData = {1 <-> 2, 2 <-> 3, 2 <-> 1}
I would like to remove any duplicates where I define a duplicate to be:
x <-> y == y <-> x
Have tried:
theRule = UndirectedEdge[p1_, p2_] :> UndirectedEdge[p2, p1]
DeleteDuplicates[theData, # == (# /. theRule) &]