Wolfram Function Repository
Instant-use add-on functions for the Wolfram Language
Function Repository Resource:
Clone a vertex of a graph
ResourceFunction["VertexCleaving"][g,v] splits the vertex v of the graph g. | |
ResourceFunction["VertexCleaving"][g,v,n] splits the vertex v of the graph g with the new vertex called n. |

Split a vertex of a graph:
| In[1]:= | ![]() |
| Out[1]= | ![]() |
Works with undirected graphs:
| In[2]:= | ![]() |
| Out[2]= | ![]() |
Directed graphs:
| In[3]:= | ![]() |
| Out[3]= | ![]() |
Weighted graphs:
| In[4]:= | ![]() |
| Out[4]= | ![]() |
Multigraphs:
| In[5]:= | ![]() |
| Out[5]= | ![]() |
Mixed graphs:
| In[6]:= | ![]() |
| Out[6]= |
Consider a network comprising the Florentine families. Following a divorce, a family will bifurcate into two entities, each retaining connections to the same links:
| In[7]:= |
| In[8]:= |
| Out[8]= | ![]() |
Wolfram Language 13.0 (December 2021) or above
This work is licensed under a Creative Commons Attribution 4.0 International License