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]= | ![]() |
Merge each vertex using a function and assign vertex weight based on the number of original vertices producing the same result:
In[2]:= | ![]() |
Out[2]= | ![]() |
Self-loops can also be weighted:
In[3]:= | ![]() |
Out[3]= | ![]() |
Produce weighted evolution graph from its full evolution graph for the MultiwaySystem:
In[4]:= | ![]() |
Out[4]= | ![]() |
In[5]:= | ![]() |
Out[5]= | ![]() |
Edge weights assigned by WeightedSimpleGraph can also be computed with EdgeMultiplicity:
In[6]:= | ![]() |
Out[6]= | ![]() |
This work is licensed under a Creative Commons Attribution 4.0 International License