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
edge_connectivity and vertex labels #19348
Comments
Author: Jori Mäntysalo |
Commit: |
comment:3
This at least seems to work. May not be best way to write the code. (Btw, I don't like to have keyword New commits:
|
comment:4
Hello Jori, Sorry but the "bug" is more in the boost function that in generic_graph.py. Otherwise we still have a function somewhere that takes a vertex-labelled graph as input and returns an integer-labelled answer. Furthermore, it is in any case better if instead of having a doctest returning 'a' you just check that the vertex belongs to the graph: the answer 'b' would be valid too. Nathann |
Changed author from Jori Mäntysalo to none |
comment:5
Replying to @nathanncohen:
OK. I mark this as needs_work. (And let others to do it.)
Ah, then I misunderstood some documentation about this kind of functions. Assuming for example that vertices are ASCII-strings, will |
comment:6
It will. But in the present case, I think that you are after a "bipartition of your vertex set", and that you could get Nathann |
Author: Michele Borassi |
comment:7
Hello! You are right: the edge connectivity is the first Boost algorithm I implemented, and I missed the vertex labels. Thank you very much for noting this. Since I made the mistake, I think I should solve it: let me know if you like my solution. I replaced Jori's branch with a different one, that corrects Have fun! Michele |
Changed branch from u/jmantysalo/edge_connectivity_and_vertex_labels to u/borassi/edge_connectivity_and_vertex_labels |
comment:9
Hello, What is the point of making a dict to map
Vincent New commits:
|
Reviewer: Vincent Delecroix |
comment:10
Replying to @sagetrac-borassi:
Yes, it is good. Actually I think that whatever makes Sage better is good. |
comment:11
Hello!
I used a dict because (I think) lists are linked lists, and the random access time is O(n). Am I missing something? |
comment:12
Replying to @sagetrac-borassi:
https://wiki.python.org/moin/TimeComplexity says that it is O(1). |
comment:13
You are right! I modified everything! |
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:15
FYI I did some more testing and it seems that I guess this could be on checklist for reviewers. This applies to all kind of containers, like graphs and sets. |
comment:16
Sorry, I have troubles understanding your comment. After you said that lists were better than dictionaries, I transformed all dictionaries named Am I missing some points? Replying to @jm58660:
|
comment:17
Replying to @sagetrac-borassi:
Sorry for being unclear. My comment did not relate to this spefic ticket. (And maybe I should have write it to sage-devel instead of this.) |
comment:18
To me at least you did right. Is there any reason why you added those Nathann |
comment:19
I inserted them in order to avoid a compilation error, saying that there was a wrong conversion from long to int. Replying to @nathanncohen:
|
comment:20
Okayyyyy Good to know. Thanks. Nathann |
comment:21
Replying to @jm58660:
More precisely:
On the other hand, if you want faster access to |
comment:22
This is still in needs_review, but the discussions seems to have end. Is there something to do, or can someone who understand the code click this to positive_review? |
Changed reviewer from Vincent Delecroix to Vincent Delecroix, Jori Mäntysalo, Nathann Cohen |
comment:23
I am ok for a positive review. I let to the other reviewers some possible final comment. |
comment:24
I have nothing against this branch. |
Changed reviewer from Vincent Delecroix, Jori Mäntysalo, Nathann Cohen to Vincent Delecroix, Jori Mäntysalo, Nathann Cohen, David Coudert |
comment:25
Passes all tests on my computer as well, so let's go. |
Changed branch from u/borassi/edge_connectivity_and_vertex_labels to |
should output
([1, [(0, 1)]], [1, [('a', 'b')]])
, but it does not look vertex labels at all.CC: @nathanncohen @sagetrac-borassi @dcoudert
Component: graph theory
Author: Michele Borassi
Branch/Commit:
7f3c0b9
Reviewer: Vincent Delecroix, Jori Mäntysalo, Nathann Cohen, David Coudert
Issue created by migration from https://trac.sagemath.org/ticket/19348
The text was updated successfully, but these errors were encountered: