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
The geodetic closure of a graph #17537
Comments
Branch: u/azi/geodeticClosure |
Branch pushed to git repo; I updated commit sha1. New commits:
|
Commit: |
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:5
Hmmm... Calling "distances_all_pairs" in a function like that is a suicide. You cannot re-compute all distances every time you want to compute a closure. Actually, the information that you need is precisely the one that is stored in The "convexity properties" object associates to every pair of vertices My point is that the code is already there, but of course the name 'convexity properties' is very ill-chosen in this case. We will probably have to change the terminology... What do you think about all this ? By the way, is the terminology 'closure' used anywhere ? Because formally it is not a closure function. One of the property of closure functions is that Nathann |
comment:6
Replying to @nathanncohen:
That's true, though we can make for an optional argument DP that lets you pass the distance dictionary in case anyone really needs to compute this often.
I see.
Fine to me. As far as my preferences go I'd like convexity properties to be part of the graph/generic graph family and cache this stuff in some other way. Having a module like that for just a few functions seems a bit unnatural to me?
Yes it appears that this is the standard way to call it. See for example the paper "On pitfalls in computing the geodetic number of a graph" by Hansen and van Omme.
|
comment:7
Yo !
Yes, it is a bad implementation. I can say it, it's mine. It is ugly. I needed someplace to store this bitset, and I did not know where.
Weird Nathann |
comment:8
Replying to @nathanncohen:
Hiiii
So what do you suggest that we do?
:-)
|
comment:9
We rename It is a bad design, but I still don't know how to implement it otherwise Nathann |
comment:10
http://en.wikipedia.org/wiki/Closure_%28mathematics%29 They also agree that a closure operator should be idempotent. Cursed wrong terminology. If we have a Nathann |
comment:11
Replying to @nathanncohen:
Okay. Do you also want to do it your way with the bitfields present there or use the thing I pushed here? In the former case I suppose its much better if you just put it in as you already know the code?
:-P
|
comment:12
Yo !
Sorry I can't do that now... Juggling with many computers at once and a slideshow to get ready for tomorrow. Can you do it ? Really it is nothing very complicated, and you should find inside some very similar function that computes the hull of a set of vertices. The geodetic is even simpler. Nathann |
comment:13
yoo, Okay hopefully I manage to do it by today. Good luck with presentation :-) Jernej |
Changed author from Jernej Azarija to Jernej Azarija, David Coudert |
Changed branch from u/azi/geodeticClosure to public/graphs/17537_geodetic_closure |
comment:14
I pushed a new branch with a more efficient implementation (in Cython). In particular, it does not require to compute and store the full distance matrix, and so can be used on quite large graphs. It is so far for undirected graphs only. New commits:
|
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:16
Add not implemented error when calling this method on digraphs. |
comment:17
Geodesic or geodetic? |
comment:18
The term used in the field is geodetic https://doi.org/10.1016/0895-7177(93)90259-2. Don't know why... |
comment:19
LGTM. If you care enough, I believe there is a typo in this comment:
|
Reviewer: Travis Scrimshaw |
comment:21
I fixed the typo. Let me know if I should set the ticket back to needs review. Thank you for the review. |
comment:22
Trac does it automatically with the push. |
Changed branch from public/graphs/17537_geodetic_closure to |
Hello!
The plan is to ship the algorithm for the minimal geodetic set of a graph but first let me try to sell this simple method for computing the geodetic closure of a (di) graph.
Let me know if there are any bugs/suggestions for this contribution.
CC: @nathanncohen
Component: graph theory
Author: Jernej Azarija, David Coudert
Branch/Commit:
6da082a
Reviewer: Travis Scrimshaw
Issue created by migration from https://trac.sagemath.org/ticket/17537
The text was updated successfully, but these errors were encountered: