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

Iterator over the minimal distance k dominating sets #35462

Merged
merged 4 commits into from
Apr 23, 2023

Conversation

dcoudert
Copy link
Contributor

@dcoudert dcoudert commented Apr 8, 2023

Fixes #35461.

📚 Description

Add parameter k to method minimal_dominating_sets to specify the domination distance to consider.

On the way, we

  • Change the default value of parameter work_on_copy to False to avoid modifying the graph by default
  • Fix the behavior when some vertices specified in parameter to_dominate are not in the graph

📝 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

None

@tscrim
Copy link
Collaborator

tscrim commented Apr 16, 2023

Can we also add a doctest showing the corner case of k=0? LGTM otherwise.

@dcoudert
Copy link
Contributor Author

I added a doctest for k=0.

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.

Thank you.

@dcoudert
Copy link
Contributor Author

Thanks for the review.

@github-actions
Copy link

Documentation preview for this PR is ready! 🎉
Built with commit: 9cdf1bf

@vbraun vbraun merged commit ecd162b into sagemath:develop Apr 23, 2023
vbraun pushed a commit that referenced this pull request Apr 23, 2023
    
Fixes #35461 (second part).

### 📚 Description

This PR adds an iterator over the **minimum** distance-k dominating
sets. This is different than PR #35462 which enables to iterate over the
**minimal** distance-k dominating sets.

### 📝 Checklist

<!-- Put an `x` in all the boxes that apply. It should be `[x]` not `[x
]`. -->

- [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
None.
    
URL: #35463
Reported by: David Coudert
Reviewer(s): Travis Scrimshaw
@mkoeppe mkoeppe added this to the sage-10.0 milestone Apr 23, 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.

Iterator over the distance-k dominating sets
4 participants