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
Refactor Closeness Centrality #19007
Comments
Author: Michele Borassi |
Changed keywords from none to Closeness centrality |
This comment has been minimized.
This comment has been minimized.
comment:3
Hello! This is the first version of the refactoring of closeness_centrality. Let me know if you like it! |
Commit: |
comment:4
I don't really understand what you are doing in this commit In the ticket description you say that you will move everything in
David. |
Branch pushed to git repo; I updated commit sha1. New commits:
|
Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:
|
comment:7
Hello! Thank you for the comment, I will try to address the main issues raised. I have put everything in a single commit, which simply removes the closeness centrality routine from About the creation of a new file: we already have file In my opinion, if we want to create a new file, we should at least move also betweenness centrality and degree centrality: in my opinion, this goes beyond the scope of this ticket. Do you agree? Best, Michele Replying to @dcoudert:
|
comment:8
Something is wrong here
I assume you want first to have `v_vert = iter(list(vert)) The default of calling David. |
comment:9
+1. In some cases a vertex can be a pair, and thus is iterable. This would react badly with this code.
Nathann |
comment:10
Right. My previous proposal is not a good solution.
|
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:12
Hello! I hope you spent a great Assumption day! With this new commit, (hopefully) I solved the problems with Thank you very much! Michele |
comment:13
Hello, I'm trying to understand the behavior of the method on digraphs. David. |
Branch pushed to git repo; I updated commit sha1. New commits:
|
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:19
Done! However, I had to do some "magic" to avoid duplicate references... Hope it is ok! |
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:21
Yep, I add to I just saw in the doc of After that I think it will be ok. David. |
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:23
Done! |
comment:24
Hello, do you understand why the patchbot reports some errors? Best, |
comment:25
What is the patchbot? How can I find these errors? |
comment:26
on the top of this page, you can see a blue disk (or red or green, etc.) with a link to http://patchbot.sagemath.org/ticket/19007/ |
Branch pushed to git repo; I updated commit sha1. New commits:
|
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:29
Note that the patchbot needs a lot of time: it is not tested instantaneously and it takes some hours of computations... |
comment:30
Ok, I will wait until it answers... In my opinion, the problem is that we need to import centrality.pyx in generic_graph at startup, and this slows down the startup time. I tried to change the imports, hoping the total time will decrease. If any of the two attempts work, we are fine, otherwise I probably have to mail sage-devel... |
comment:31
Well, generic graph is becoming really really big with lots of tests. David. |
comment:32
I'm afraid that all the attempts I have made were unsuccessful. The point is that importing module In my opinion, this might be a reason why it is better to leave method If we still want to move |
comment:33
ok, move it back to generic graph. |
Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:
|
Reviewer: David Coudert |
comment:35
For me the patch is good to go, but I prefer to wait for the next patchbot answer. |
comment:36
Since the patchbot reports no error and that the patch passes all tests/docbuild/etc. on my computer, I set it to positive review. |
Changed branch from u/borassi/refactor_centrality_closeness to |
Now, the closeness centrality algorithm simply calls the corresponding NetworkX routine (only for undirected graphs).
This ticket will move this routine to file generic_graph (closeness centrality is defined also in this case ![1]), and it will modify input/output variables as in routine shortest_path. Then, it will call our shortest path new routines instead of NetworkX routines.
This ticket is a first step towards the inclusion of the algorithm in ![2].
![1] !http://ieeexplore.ieee.org/xpls/abs_all.jsp?arnumber=6816651&tag=1
![2] !http://arxiv.org/pdf/1507.01490v1.pdf
Depends on #18931
Depends on #18876
Depends on #18910
CC: @nathanncohen @dcoudert
Component: graph theory
Keywords: Closeness centrality
Author: Michele Borassi
Branch/Commit:
1551c6f
Reviewer: David Coudert
Issue created by migration from https://trac.sagemath.org/ticket/19007
The text was updated successfully, but these errors were encountered: