Wolfram Function Repository
Instant-use add-on functions for the Wolfram Language
Function Repository Resource:
Test if a graph is oriented
| ResourceFunction["OrientedGraphQ"][gr] tests whether a graph gr is oriented. | 
There is a symmetric pair of directed edges between vertices 1 and 2 so this graph is not oriented:
| In[1]:= | ![ResourceFunction["OrientedGraphQ"][
 Graph[{1 \[DirectedEdge] 2, 1 \[DirectedEdge] 3, 2 \[DirectedEdge] 1}]]](https://www.wolframcloud.com/obj/resourcesystem/images/645/645e55ea-0200-4fa0-9a7a-0ae9f1a4d109/0a1221a50f6070fd.png) | 
| Out[1]= |  | 
Without one of those edges, it is:
| In[2]:= | ![ResourceFunction["OrientedGraphQ"][
 Graph[{1 \[DirectedEdge] 2, 1 \[DirectedEdge] 3}]]](https://www.wolframcloud.com/obj/resourcesystem/images/645/645e55ea-0200-4fa0-9a7a-0ae9f1a4d109/05adef1005fe364e.png) | 
| Out[2]= |  | 
This work is licensed under a Creative Commons Attribution 4.0 International License