Open
Conversation
cc_conn does not have a len() method. Iterating seems to destroy the items, so instead of iterating and counting or keeping a max, just sort by the sizes and return a count and the first entry in descending order.
cc_conn has no len() function defined. Sort by size and report the number and largest.
Fixed importing of Generator to KroneckerGenerator
Collaborator
|
Thank you for pointing these out. The cc_conn issue I am fairly certain I fixed a long time ago, but must have never pushed it to github. I will check all of this out and merge ASAP. It definitely looks like some of the the Kronecker stuff is not the latest, which is my fault. I will make sure this is fixed. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I was having problems running the simulation as is.
Turns out that the return value of nx.connected_components(...) does not have a len method. So the len() fails.
Instead, it is able to be sorted into an array that does what is desired (I believe).
If the patch is implementing the wrong logic, please let me know and I'll fix it.
We are using this in the NSCTA.
My current development platform is Ubuntu 16.10. Python 2.7