CC: | an.gorohovski [...] gmail.com |
Subject: | Problem division by zero |
Hello Jarkko,
I cannot but admire your Graph module.
Excuse me, but I found some problem using
clustering_coefficient function to empty graph
(network without any edges).
I got error message:
"Illegal division by zero at .../alessandro/perl5/lib/perl5/Graph.pm line 4026."
Yeah, I looked this line:
$ tail -n +4026 Graph.pm | head -n 1
$gamma /= $g->vertices();
I think here problem of controlling the zero value $g->vertices().
Sorry for next question:
Have you idea to add useful function of the calculation Assortativity coefficient
(Newman M. E. J. Mixing patterns in networks // Phys. Rev. E 67, 026126.
2003 by the American Physical Society
http://arxiv.org/abs/cond-mat/0209450)
?
Regards, Alessandro