-
-
Notifications
You must be signed in to change notification settings - Fork 405
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
Resolve nice tree decomp bug in #36843, and allow label_nice_tree_decomposition
to return a digraph
#36846
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
… allow `label_nice_tree_decomposition` to return a digraph This PR aims to resolve sagemath#36843, i.e., it now handles potential join nodes and singleton tree decomp correctly. This PR also allows `label_nice_tree_decomposition` to return a directed graph, and treats the root node as a `forget` node, simplifying algorithm implementation. <!-- ^^^^^ Please provide a concise, informative and self-explanatory title. Don't put issue numbers in there, do this in the PR body below. For example, instead of "Fixes sagemath#1234" use "Introduce new method to calculate 1+1" --> <!-- Describe your changes here in detail --> <!-- Why is this change required? What problem does it solve? --> <!-- If this PR resolves an open issue, please link to it here. For example "Fixes sagemath#12345". --> <!-- If your change requires a documentation PR, please link it appropriately. --> ### 📝 Checklist <!-- Put an `x` in all the boxes that apply. --> <!-- If your change requires a documentation PR, please link it appropriately --> <!-- If you're unsure about any of these, don't hesitate to ask. We're here to help! --> <!-- Feel free to remove irrelevant items. --> - [x] The title is concise, informative, and self-explanatory. - [x] The description explains in detail what this PR is about. - [x] I have linked a relevant issue or discussion. - [x] I have created tests covering the changes. - [x] I have updated the documentation accordingly. ### ⌛ Dependencies <!-- List all open PRs that this PR logically depends on - sagemath#12345: short description why this is a dependency - sagemath#34567: ... --> <!-- If you're unsure about any of these, don't hesitate to ask. We're here to help! --> URL: sagemath#36846 Reported by: Jing Guo Reviewer(s): David Coudert, Dima Pasechnik, Jing Guo
The difficulty is that we can have several valid solutions and we have no control on the solution we will get.
or
or
etc. A suggestion is to mark the for loop of the doctest as |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you. LGTM.
@antonio-rojas, is it ok for you ? |
Documentation preview for this PR (built with commit 2b6f2a9; changes) is ready! 🎉 |
Yes, all tests pass now |
This PR aims to resolve #36843, i.e., it now handles potential join nodes and singleton tree decomp correctly.
This PR also allows
label_nice_tree_decomposition
to return a directed graph, and treats the root node as aforget
node, simplifying algorithm implementation.📝 Checklist
⌛ Dependencies