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
graph subgraph_search does not return copy of subgraph #12164
Comments
comment:2
Steve Butler suggests that instead, we copy the smaller graph and relabel the vertices appropriately, using the vertices returned from SubgraphSearch. I like that solution. But it won't quite work to do that, since a subgraph of a graph inherits lots of properties, like a name, etc. So instead, this patch just creates a subgraph where the vertices and the edges are specified. Before, just the vertices were specified, so you ended up getting an induced subgraph, even if the subgraph was not an induced subgraph. |
This comment has been minimized.
This comment has been minimized.
Author: Jason Grout |
This comment has been minimized.
This comment has been minimized.
comment:6
Hellooooooo !! First, I'm glad to see somebody's using that function ! It needs to be totally rewritten anyway, as we now have.... Cython iterators ! So the whole class has become useless. This being said, what you are doing is much more urgent. Could I ask for a small "if induced" before those lines, so that the graph is copied/relabeled only if it is necessary ? Nathann |
comment:7
Attachment: trac-12164-subgraph_search.patch.gz Done. I also added a few more tests to the documentation (one of which would have caught this error originally---looking for the non-induced P_5_ in the petersen graph. |
comment:8
Then it's good to go ! All tests pass, and there is just nothing to add Nathann |
Reviewer: Nathann Cohen |
Merged: sage-4.8.alpha5 |
Consider this example:
The docs say that s should be a copy of p3. The problem is that subgraph_search returns an induced subgraph of the bigger graph with the vertices of the copy of the smaller graph.
apply: attachment: trac-12164-subgraph_search.patch
CC: @nathanncohen @sagetrac-brunellus
Component: graph theory
Author: Jason Grout
Reviewer: Nathann Cohen
Merged: sage-4.8.alpha5
Issue created by migration from https://trac.sagemath.org/ticket/12164
The text was updated successfully, but these errors were encountered: