Wolfram Function Repository
Instant-use add-on functions for the Wolfram Language
Function Repository Resource:
Count the multiplicity of edges in a graph
ResourceFunction["EdgeMultiplicity"][graph] returns edge multiplicities for all the edges in a graph. | |
ResourceFunction["EdgeMultiplicity"][graph, v] returns edge multiplicities for edges starting with vertex v. | |
ResourceFunction["EdgeMultiplicity"][graph,All,w] returns edge multiplicities for edges ending with vertex w. | |
ResourceFunction["EdgeMultiplicity"][graph,v,w] returns edge multiplicities starting with vertex v and ending with vertex w. |
Count edges in an undirected multigraph:
In[1]:= |
Out[1]= |
Count edges in a directed multigraph:
In[2]:= |
Out[2]= |
Count edges in a mixed multigraph:
In[3]:= |
Out[3]= |
Count edges starting with a given vertex:
In[4]:= |
Out[4]= |
Count edges ending with a given vertex:
In[5]:= |
Out[5]= |
Count edges starting and ending with a given vertex:
In[6]:= |
Out[6]= |
Use patterns:
In[7]:= |
Out[7]= |
This work is licensed under a Creative Commons Attribution 4.0 International License