-
-
Notifications
You must be signed in to change notification settings - Fork 407
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
gh-36587: Created functions to generate random k-tree and partial k-t…
…ree graphs <!-- ^^^^^ 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 #1234" use "Introduce new method to calculate 1+1" --> <!-- Describe your changes here in detail --> Implemented graph generators which produce a random k-tree and a random partial k-tree. The k-tree algorithm first generates a complete graph, before adding vertices one by one, creating a clique utilising random existing vertices and the new vertex. Partial k-trees are generated by producing a k-tree and then randomly removing edges from it. <!-- Why is this change required? What problem does it solve? --> Previously SageMath lacked a way to generat randomised graphs which have a fixed treewidth value. This provides a methodology to do so . <!-- If this PR resolves an open issue, please link to it here. For example "Fixes #12345". --> Addresses #36586 <!-- 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. <!-- If you're unsure about any of these, don't hesitate to ask. We're here to help! --> URL: #36587 Reported by: Damian Basso Reviewer(s): Damian Basso, David Coudert
- Loading branch information
Showing
2 changed files
with
193 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters