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
BipartiteGraph blindly trusts generic graphs #28897
Comments
New commits:
|
Commit: |
Branch: public/28897 |
comment:2
Actually, the added doctest shows that we need a specific method for |
comment:4
At the moment everything works fine. However, once one modifies The doctest would just ensure that one doesn't miss it with little effort for now. |
comment:5
No. In 9.0.beta9, |
comment:6
Ok. Never mind. I must have misread and not tested it (even though I thought I did). |
This comment has been minimized.
This comment has been minimized.
Branch pushed to git repo; I updated commit sha1. New commits:
|
Reviewer: David Coudert |
comment:10
You must change the documentation for parameter
I just realized that some input parameters of Instead of defining a function |
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:12
Ok. As for ignoring loops, I wouldn't allow it. In a generic graph, I can see that one wants the method to remove loops for comfort. In a bipartite graph, one needs to clean up the input anyway. Loops is just one of many cases, where the ends of an edge are not in different parts. |
comment:13
Please set the default value of loops to Once done, you can set to positive review on my behalf. |
comment:14
I don't understand. Doesn't |
comment:15
No, in Graph we raise an error when loops is
|
comment:16
Yes. But when you do
it just ignores all the loops and does not raise an error (as is documented in |
comment:17
Right. LGTM. |
comment:18
9.0 is out |
Changed branch from public/28897 to |
BipartiteGraph
does currently check edges, when using the methodadd_edges
:This doesn't raise an error, but it should.
While
BipartiteGraph
has its own methodadd_edge
, it seems to trust generic graph doadd_edges
by iterating over the edges and callingadd_edge
. This is not the case (anymore).We fix this, by implementing the method
add_edges
forBipartiteGraph
, which just calls the backend on the prechecked edges.Component: graph theory
Keywords: bipartite graph, add edges
Author: Jonathan Kliem
Branch/Commit:
b0753d2
Reviewer: David Coudert
Issue created by migration from https://trac.sagemath.org/ticket/28897
The text was updated successfully, but these errors were encountered: