[英]Python igraph density function for directed graphs
Does python igraph function 'G.density()' calculate the density for an undirected graph only? python igraph函数'G.density()'仅计算无向图的密度吗? I want to calculate the density for an directed graph.
我想计算有向图的密度。 Must I divide by 2?
我必须除以2吗? There is an option for 'loop'=True or False but there is no option for directed or undirected graph.
'loop'= True或False有一个选项,但有向图或无向图则没有任何选项。 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. 我在文档中没有看到任何内容。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.