Wolfram Function Repository
Instant-use add-on functions for the Wolfram Language
Function Repository Resource:
Generate a barbell graph
ResourceFunction["BarbellGraph"][n,m] generates a barbell graph using size n barbells and a length m connection. |
Create a Barbell graph of size 5, connected directly to each other (zero intermediate nodes):
In[1]:= | ![]() |
Out[1]= | ![]() |
The same graph, but connected via three intermediate nodes:
In[2]:= | ![]() |
Out[2]= | ![]() |
A grid of the simplest possible Barbell graphs:
In[3]:= | ![]() |
Out[3]= | ![]() |
Wolfram Language 14.0 (January 2024) or above
This work is licensed under a Creative Commons Attribution 4.0 International License