Wolfram Function Repository
Instant-use add-on functions for the Wolfram Language
Function Repository Resource:
Modify Graph to include extraverted double edges
ResourceFunction["BidirectedGraph"][g] returns graph g, styled as a bidirectional graph, by default collapsing 2-cycles into extraverted edges. | |
ResourceFunction["BidirectedGraph"][{e1,e2,…}] returns the graph with edges ej, styled as a bidirectional graph, by default collapsing 2-cycles into extraverted edges. |
Force two-cycles from DirectedGraph to overlap:
In[1]:= |
Out[1]= |
Do not collapse edges:
In[2]:= |
Out[2]= |
Instead of converting graphs, specify edges directly:
In[3]:= |
Out[3]= |
BidirectedGraph supports four different edge specifications:
In[4]:= |
Out[4]= |
Due to hacking of Graph, edge colorings may work out incorrectly:
In[5]:= |
Out[5]= |
However, with more care, it is possible to get correct colorings:
In[6]:= |
Out[6]= |
Reduce clutter on multiway graphs:
In[7]:= |
In[8]:= |
Out[8]= |
This work is licensed under a Creative Commons Attribution 4.0 International License