Wolfram Function Repository
Instant-use add-on functions for the Wolfram Language
Function Repository Resource:
Create a random weighted graph
ResourceFunction["RandomWeightedGraph"][{v,e},randomfunction] generates a random graph with v vertices and e edges with edge weights given by randomfunction. | |
ResourceFunction["RandomWeightedGraph"][graphdistribution,randomfunction] generates a random graph following graphdistribution. | |
ResourceFunction["RandomWeightedGraph"][spec,randomfunction,k] generates k random graphs. | |
ResourceFunction["RandomWeightedGraph"][spec,randomfunction,dims] generates an array with dimensions dims. |
Make a random graph:
| In[1]:= |
| Out[1]= | ![]() |
Make a random graph with edge weights between 1 and 7:
| In[2]:= |
| Out[2]= | ![]() |
Make a random graph with integer weights:
| In[3]:= |
| Out[3]= | ![]() |
Make a list of random graphs:
| In[4]:= |
| Out[4]= | ![]() |
Make an array of random graphs:
| In[5]:= |
| Out[5]= | ![]() |
Make a random graph with a graph distribution:
| In[6]:= |
| Out[6]= | ![]() |
Create a random weighted graph with integer weights with edge labels:
| In[7]:= |
| Out[7]= | ![]() |
Create a random weighted graph:
| In[8]:= |
| Out[8]= | ![]() |
Find a solution to the undirected Chinese Postman problem for this graph:
| In[9]:= |
| Out[9]= |
Make a table highlighting the steps by constructing directed graphs:
| In[10]:= |
| Out[11]= | ![]() |
This work is licensed under a Creative Commons Attribution 4.0 International License