You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
No answer here, so I ask explicitly again about (2).
In SparseGraphBackend, for example, the following lines appear in the add_edge method:
if (notself.loops(None)) andu_int==v_int:
return
This means that if the backend does not allow loops, the add_edge method silently ignore the added edge. By default, SparseGraphBackend does not allow loops.
Is this a wanted behaviour?
If not, there are couple of ways to handle this:
raise from inside the backend method
warn (somehow) from inside the backend method
let the backend return False (or whatever) in case the edge was not added, and let the graph itself notice it and raise/warn
Adding a loop to a graph with allows_loops=False do nothing.Is this the proper behavior?
CC: @vbraun @nathanncohen
Component: graph theory
Issue created by migration from https://trac.sagemath.org/ticket/12540
The text was updated successfully, but these errors were encountered: