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

Overwrote methods concerning loops for a matching covered graph #38955

Merged
merged 20 commits into from
Dec 8, 2024

Conversation

janmenjayap
Copy link
Contributor

@janmenjayap janmenjayap commented Nov 10, 2024

The objective of this issue is to overwrite the methods pertaining to loops for a matching covered graph.

More specifically, this PR aims to implement/ update the following methods:

  • allow_loops(): Change whether loops are allowed in (matching covered) graphs.
  • allows_loops(): Return whether loops are permitted in (matching covered) graphs.
  • has_loops(): Check whether thare are loops in the (matching covered) graph.
  • loop_edges(): Return a list of all loops in the (matching covered) graph.
  • loop_vertices(): Return a list of vertices with loops.
  • loops(): Return a list of all loops in the (matching covered) graph.
  • number_of_loops(): Return the number of edges that are loops.
  • remove_loops(): Remove loops on vertices in vertices.

This PR shall address the methods related to loops for matching covered graphs.

Fixes #38216. Note that this issue fixes a small part of the mentioned issue.

📝 Checklist

  • The title is concise and informative.
  • 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 and checked the documentation preview.

⌛ Dependencies

This PR depends on the PR #38742.

cc: @dcoudert.

Copy link
Contributor

@dcoudert dcoudert left a comment

Choose a reason for hiding this comment

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

I think you added too many doctests. Do we really need to tests all the methods in the tests of all methods ?

@janmenjayap
Copy link
Contributor Author

I think you added too many doctests. Do we really need to tests all the methods in the tests of all methods ?

Oh.
I will rectify this.

Copy link

github-actions bot commented Nov 10, 2024

Documentation preview for this PR (built with commit 91c97b4; changes) is ready! 🎉
This preview will update shortly after each push to this PR.

@dcoudert dcoudert added c: graph theory gsoc: 2024 Tag for GSoC2024 issues/PRs labels Nov 11, 2024
Copy link
Contributor

@dcoudert dcoudert left a comment

Choose a reason for hiding this comment

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

LGTM.

@janmenjayap
Copy link
Contributor Author

Hi,
If I am not mistaken, shouldn't we wait till the PR #38742 is merged followed by resolving the conflicts in this PR after pulling the changes from develop branch?

@dcoudert
Copy link
Contributor

Yes, it would be much better. I'm setting back this PR to needs review then.

Copy link
Contributor

@dcoudert dcoudert left a comment

Choose a reason for hiding this comment

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

LGTM.

vbraun pushed a commit to vbraun/sage that referenced this pull request Dec 6, 2024
…overed graph

    
<!-- ^ Please provide a concise and informative title. -->
The objective of this issue is to overwrite the methods pertaining to
loops for a matching covered graph.

<!-- ^ Don't put issue numbers in the title, do this in the PR
description below. -->
<!-- ^ For example, instead of "Fixes sagemath#12345" use "Introduce new method
to calculate 1 + 2". -->
<!-- v Describe your changes below in detail. -->
More specifically, this PR aims to implement/ update the following
methods:
- [x] `allow_loops()`: Change whether loops are allowed in (matching
covered) graphs.
- [x] `allows_loops()`: Return whether loops are permitted in (matching
covered) graphs.
- [x] `has_loops()`: Check whether thare are loops in the (matching
covered) graph.
- [x] `loop_edges()`: Return a list of all loops in the (matching
covered) graph.
- [x] `loop_vertices()`: Return a list of vertices with loops.
- [x] `loops()`: Return a list of all loops in the (matching covered)
graph.
- [x] `number_of_loops()`: Return the number of edges that are loops.
- [x] `remove_loops()`: Remove loops on vertices in ``vertices``.

<!-- v Why is this change required? What problem does it solve? -->
This PR shall address the methods related to loops for matching covered
graphs.

<!-- v If this PR resolves an open issue, please link to it here. For
example, "Fixes sagemath#12345". -->
Fixes sagemath#38216. Note that this issue fixes a small part of the mentioned
issue.

### 📝 Checklist

<!-- Put an `x` in all the boxes that apply. -->

- [x] The title is concise and informative.
- [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 and checked the documentation
preview.

### ⌛ Dependencies
This PR depends on the PR sagemath#38742.

<!-- List all open PRs that this PR logically depends on. For example,
-->
<!-- - sagemath#12345: short description why this is a dependency -->
<!-- - sagemath#34567: ... -->

cc: @dcoudert.
    
URL: sagemath#38955
Reported by: Janmenjaya Panda
Reviewer(s): David Coudert
vbraun pushed a commit to vbraun/sage that referenced this pull request Dec 8, 2024
…overed graph

    
<!-- ^ Please provide a concise and informative title. -->
The objective of this issue is to overwrite the methods pertaining to
loops for a matching covered graph.

<!-- ^ Don't put issue numbers in the title, do this in the PR
description below. -->
<!-- ^ For example, instead of "Fixes sagemath#12345" use "Introduce new method
to calculate 1 + 2". -->
<!-- v Describe your changes below in detail. -->
More specifically, this PR aims to implement/ update the following
methods:
- [x] `allow_loops()`: Change whether loops are allowed in (matching
covered) graphs.
- [x] `allows_loops()`: Return whether loops are permitted in (matching
covered) graphs.
- [x] `has_loops()`: Check whether thare are loops in the (matching
covered) graph.
- [x] `loop_edges()`: Return a list of all loops in the (matching
covered) graph.
- [x] `loop_vertices()`: Return a list of vertices with loops.
- [x] `loops()`: Return a list of all loops in the (matching covered)
graph.
- [x] `number_of_loops()`: Return the number of edges that are loops.
- [x] `remove_loops()`: Remove loops on vertices in ``vertices``.

<!-- v Why is this change required? What problem does it solve? -->
This PR shall address the methods related to loops for matching covered
graphs.

<!-- v If this PR resolves an open issue, please link to it here. For
example, "Fixes sagemath#12345". -->
Fixes sagemath#38216. Note that this issue fixes a small part of the mentioned
issue.

### 📝 Checklist

<!-- Put an `x` in all the boxes that apply. -->

- [x] The title is concise and informative.
- [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 and checked the documentation
preview.

### ⌛ Dependencies
This PR depends on the PR sagemath#38742.

<!-- List all open PRs that this PR logically depends on. For example,
-->
<!-- - sagemath#12345: short description why this is a dependency -->
<!-- - sagemath#34567: ... -->

cc: @dcoudert.
    
URL: sagemath#38955
Reported by: Janmenjaya Panda
Reviewer(s): David Coudert
@vbraun vbraun merged commit b409cf3 into sagemath:develop Dec 8, 2024
22 of 23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c: graph theory gsoc: 2024 Tag for GSoC2024 issues/PRs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

On Decompositions, Generation Methods and related concepts in the theory of Matching Covered Graphs
3 participants