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.spanning_trees does not like loops #19291
Comments
Branch: u/ncohen/19291 |
comment:1
Here is a fix. By the way, if you need this function for some hard computations know that there is room for much improvement in there. Nathann New commits:
|
Commit: |
Author: Nathann Cohen |
Reviewer: Stefan van Zwam |
comment:2
I was just exploring some graph methods, I don't actually need to use it for now. Your change forces a copy of the graph to be made regardless of whether there are loops. That's definitely safer than what happened before, but could be costly in terms of memory for big graphs. Still, I prefer the corresponding increase in safety of the code, so I will approve. |
comment:3
Replying to @sagetrac-Stefan:
Well, considering such running time, it is likely that no one will use this method for "big graphs".
|
comment:4
Yeah, precisely. Stefan: to answer your question, I did not mind adding a graph copy to this method because, well, given the way it is written, the amount of wasted time is so high that this copy makes no difference. If you ever need this method "seriously", it will have to be reimplemented. Nathann |
Changed branch from u/ncohen/19291 to |
goes "boom" (recursion depth exceeded). It also destroys G in the process, which shouldn't happen, I think.
Component: graph theory
Author: Nathann Cohen
Branch/Commit:
6a86e23
Reviewer: Stefan van Zwam
Issue created by migration from https://trac.sagemath.org/ticket/19291
The text was updated successfully, but these errors were encountered: