-
Notifications
You must be signed in to change notification settings - Fork 17
Bipartite rewiring network with Guilherme #30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
nwlandry
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall looks good, just a few changes :)
netrw/rewire/RewireBipartite.py
Outdated
|
|
||
| return G | ||
|
|
||
| def full_rewire(self, G, accuracy, max_step=0, copy_graph=True, verbose=False): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
max_step should be called timesteps to be consistent with other methods.
netrw/rewire/RewireBipartite.py
Outdated
|
|
||
| # Single step: Stochastic | ||
| # This method may return the same graph | ||
| def step_rewire(self, G): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we agreed on a copy_graph keyword with a False default value for step_rewire as well?
| import random as rand | ||
|
|
||
|
|
||
| class RewireBipartite(BaseRewirer): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you add a check to see whether the input graph is, in fact, bipartite?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the step_rewire method
(need to be optimized a bit, we are working on it)