Closed cloudy-sfu closed 3 years ago
Does this work on a non-empty graph? If so, just add a line to clustering coefficients to return 0 for the empty graph.
Yes, It works on a non-empty matrix. However, it’s weird that it shuts down, instead of raising an error. Why doesn’t it raise an error? Thank you for answering, and I'm curious about it.
I had thought we had good empty checks in all the codes, but this one must have gotten missed...
Sorry about that, the easiest thing to do is just to add a check that the graph has any edges. I'm surprised this actually throws an error as it seems like the algorithm ought to work in such cases. I wonder if Mathworks changed howo they store these things.
Sorry again!
On Wed, Feb 17, 2021 at 12:31 PM cloudy-sfu notifications@github.com wrote:
Yes, It works on a non-empty matrix. However, it’s weird that it shuts down, instead of raising an error. Why doesn’t it raise an error? Thank you for answering, and I'm curious about it.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/dgleich/matlab-bgl/issues/23#issuecomment-780721699, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAIJS7XPPNZLYYEQYCUUHLS7P4PBANCNFSM4XE6YSLA .
The suggestion to fix this issue: https://github.com/dgleich/matlab-bgl/pull/24
The most simplified script to make this problem reappear:
It doesn't raise an error, instead, MATLAB shuts down.