Reputation: 73
Does python igraph function 'G.density()' calculate the density for an undirected graph only? I want to calculate the density for an directed graph. Must I divide by 2? There is an option for 'loop'=True or False but there is no option for directed or undirected graph. I know that for an undirected graph, the density is
2m/n(n-1)
while for directed graph it us
m/n(n-1)
I am not seeing anything in the documentation.
Upvotes: 1
Views: 737