Wolfram Function Repository
Instant-use add-on functions for the Wolfram Language
Function Repository Resource:
SimpleGraph with edge and vertex weights
ResourceFunction["WeightedSimpleGraph"][g] gives the underlying simple graph from the graph g with edge weights corresponding to edge multiplicities. | |
ResourceFunction["WeightedSimpleGraph"][g,f] also applies function f to vertices of the graph g and assigns vertex weights based on produced tally. |
Remove multi-edges from a graph and assign edge weights with their multiplicities:
In[1]:= | ![]() |
Out[1]= | ![]() |
Work with mixed graphs:
In[2]:= | ![]() |
Out[2]= | ![]() |
Merge each vertex using a function and assign vertex weight based on the number of original vertices producing the same result:
In[3]:= | ![]() |
Out[3]= | ![]() |
Self-loops can also be weighted:
In[4]:= | ![]() |
Out[4]= | ![]() |
Produce weighted evolution graph from its full evolution graph for the MultiwaySystem:
In[5]:= | ![]() |
Out[5]= | ![]() |
In[6]:= | ![]() |
Out[6]= | ![]() |
Edge weights assigned by WeightedSimpleGraph can also be computed with EdgeMultiplicity:
In[7]:= | ![]() |
Out[7]= | ![]() |
This work is licensed under a Creative Commons Attribution 4.0 International License