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
memory efficient implementation of Wiener index #30247
Comments
Branch: public/graphs/30247_wiener |
Commit: |
New commits:
|
comment:2
Without this patch
With this patch
|
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:4
I did a small correction for directed graphs in I let the weighted case open. |
comment:5
Replying to @dcoudert:
I can work on implementing the weighted version of |
comment:6
Feel free to do it. As you can see, it is interesting as now we can go for larger graphs and consume little memory. |
Branch pushed to git repo; I updated commit sha1. New commits:
|
This comment has been minimized.
This comment has been minimized.
comment:8
Best Vipul |
Changed keywords from none to gsoc2020 |
Changed author from David Coudert to David Coudert, Vipul Gupta |
comment:10
Replying to @vipul79321:
Certainly because the usage of the list of algorithms has not been updated. No specific reason I think.
Are you sure it's always failing ? The key questions are:
In general, it's important to be able to return the correct type, but we can also document the fact that some algorithm are able to return only double, double or int, or any type. For instance, using a pure Python code, we should be able to compute distances over rationals and more generally any type supporting addition and with a total ordering of its elements. But using boost, it's not possible. Can you update examples in boost and |
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:12
Replying to @dcoudert:
It fails for this basic scenario when edge weights are both integer and non-integer. See this for instance -
Yes. See this piece of code in
Sorry, I didnt understand what you mean.
Yeah, We can mention that in documentation, because with boost we can only get double values. Currently, I dont have any scenario where
|
comment:13
OK. If we document properly that the returned values with boost are always double, then I'm Ok to remove the correct type stuff.
Do we have methods calling distance computation with boost and assuming that the returned value is an int ?
In such case, the weights are converted to double. So a user expecting a results with pi must use another method. For instance:
But so far we have an error for wiener index:
so we must change from |
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:15
Replying to @dcoudert:
Done. I have tried to add a note in P.S - There is already an example to show this in documentation. |
comment:25
I made the changes except:
Do you think I should do like networkx and return 0 for one element graphs ?
|
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:27
I let wiener index of empty graph undefined and set the 0 the wiener index of one vertex graphs. |
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:29
this last commit fix a new error appearing when using boost 1.7.3 (I have a new laptop with it). With boost 1.7.2, we don't have this error.
|
comment:30
Build error
|
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:32
This version is much simpler, avoids modifying the boost interface, and I expect more robust. |
comment:34
oups, wrong button ;) |
Reviewer: Vipul Gupta |
comment:37
Thanks for making the suggested changes. I didn't get around to finally reviewing it, but I wrote don't anything that somewhat bothered me. |
comment:38
Thank you. Do not hesitate to add your name as reviewer. |
Changed reviewer from Vipul Gupta to Vipul Gupta, Jonathan Kliem |
Changed branch from public/graphs/30247_wiener to |
We improve the implementation of Wiener index for (weighted) (di)graphs by avoiding to compute and store into memory the full distance matrix. This way we can compute this index for larger graphs.
CC: @vipul79321 @kliem
Component: graph theory
Keywords: gsoc2020
Author: David Coudert, Vipul Gupta
Branch/Commit:
acf7647
Reviewer: Vipul Gupta, Jonathan Kliem
Issue created by migration from https://trac.sagemath.org/ticket/30247
The text was updated successfully, but these errors were encountered: