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
Barycentric embedding for planar graphs. #9699
Comments
Attachment: trac_9699.patch.gz Updated patch, it includes an example. |
comment:3
I wonder if the default for |
Attachment: trac_9699_2.patch.gz Please apply instead of trac_9699.patch. |
comment:4
Replying to @rlmill:
The option |
comment:5
Replying to @rlmill:
Sorry, I forgot to be more specific. Please apply trac_9699_2.patch instead of trac_9699.patch. In trac_9699_2.patch the option |
comment:6
Well, if such an option is the default, shouldn't we just replace the actual code with it ? As these barycentric coordinates are as valid as the previous ones in the general case, I except the code used by barycentric = False never to be used again... What about just replacing the current code to compute barycentric coordinates, and add this information as notes in the documentation ? Nathann |
comment:7
Replying to @nathanncohen:
I think the previous implementation features interesting properties. It provided a straightline embedding in an O(n) by O(n) grid, so in particular all the coordinates are integers. Would you still suggest to replace the code completely? Fidel |
comment:8
No, not anymore... But now I would suggest to mention these properties in the docstring. Sorry for asking it this late, but I am concerned about avoiding to have in Sage at the same time two pieces of code doing the same thing in different ways, and writing it in such a way that one of them is never used.. That's why I wondered whether it would be better to completely replace the current implementation with yours instead of having two version. If the current version has properties that yours do not have, then you are right : it should remain available, but this is not very useful if nobody knows these properties exists.... Hence, where you documented the keyword
it would be nice to also mention that setting it to Nathann |
Please apply instead of previous patches. |
comment:9
Attachment: trac_9699_3.patch.gz Replying to @nathanncohen:
These properties are now mentioned in the docstring :) Fidel |
comment:10
Hello !! I noticed a typo in your patch
So I first wrote a small one to fix it, then ended up fixing one or two other docstrings, or adding to them the information you had put in the first description or Thanksssssssssssssss ! :-) Nathann |
Attachment: trac_9699 - docstring fixes.patch.gz |
comment:11
Doctest fail:
Also, all of the positions should be the same format: here some are tuples and others are lists. |
Reviewer: Nathann Cohen, Robert Miller |
Attachment: trac_9699_4.patch.gz Please apply instead of previous patches. |
comment:12
Hello, The patch file trac_9699_4.patch includes a fix to the doctest fail. It also includes a fix to the problem having tuples and lists for the positions. Now, all of the positions are lists. Fidel |
comment:15
Has this been tested on various systems? The kind of output like
has a tendency of being quite system-dependent because of precision issues. In any case, if all you did was add an option, why did the output change? |
comment:17
Replying to @jdemeyer:
Jeroen is right. You should replace things like |
Attachment: trac_9699_5.patch.gz Please apply instead of previous patches. |
comment:18
Replying to @rlmill:
Replaced things like Please see trac_9699_5.patch instead of previous versions. |
comment:19
Okay, I tested all long doctests on a 64 bit Linux machine, and all passed. I also tested long doctests in |
comment:20
It seems I pressed submit too soon. Indeed all tests pass on the 64 bit system. However on the 32-bit system, things seem to freeze at the following test:
|
comment:21
Ugh. Once again I spoke too soon. The real problem is just that the doctests take much longer after the patch than before. On the 32 bit system it went from 243.2 s for On the (much faster) 64 bit system it was 130.4 s before and 441.2 s after. This definitely counts as a regression, and I can't let things through with so much of a slowdown. |
Positions of vertices returned by planar_layout can be set to have the vertices of an equilateral triangle as exterior vertices.
Apply only attachment: trac_9699_4.patch
CC: @rlmill @boothby
Component: graph theory
Author: Fidel Barrera-Cruz
Reviewer: Nathann Cohen, Robert Miller
Issue created by migration from https://trac.sagemath.org/ticket/9699
The text was updated successfully, but these errors were encountered: