Skip to content
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

Improve method is_planar #36021

Merged
merged 12 commits into from
Sep 10, 2023
Merged

Conversation

dcoudert
Copy link
Contributor

@dcoudert dcoudert commented Aug 2, 2023

Fixes #35152.

We improve the method to avoid working with embeddings when the input (di)graph has multiple edges or loops, or when the input digraph has pairs of opposite arcs. In these cases, the notion of embedding is not consistently defined so far as it mixes neighbors and incident edges.

We now allow to set positions whenever embeddings are not involved.

We also avoid modifying the input graph in method is_planar from planarity.pyx and reorder some operations.

📝 Checklist

  • The title is concise, informative, and self-explanatory.
  • The description explains in detail what this PR is about.
  • I have linked a relevant issue or discussion.
  • I have created tests covering the changes.
  • I have updated the documentation accordingly.

⌛ Dependencies

@dcoudert
Copy link
Contributor Author

ping

@dcoudert dcoudert requested review from videlec and removed request for videlec September 2, 2023 08:03
@dcoudert dcoudert requested a review from tscrim September 9, 2023 08:26
Copy link
Collaborator

@tscrim tscrim left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, but could you make one small tweak to the error message outputs and put one extra space on the second line after the break; e.g.,

NotImplementedError: a really long
 doctest output line

Once done, you can set a positive review.

@dcoudert
Copy link
Contributor Author

dcoudert commented Sep 9, 2023

Thank you for the review.

@github-actions
Copy link

github-actions bot commented Sep 9, 2023

Documentation preview for this PR (built with commit 933707f; changes) is ready! 🎉

@vbraun vbraun merged commit 754e88a into sagemath:develop Sep 10, 2023
12 checks passed
@mkoeppe mkoeppe added this to the sage-10.2 milestone Sep 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

RuntimeError in Graph.is_planar for some directed graphs with allow_multiple_edges set
5 participants