I'm in favor of this change. The code is faster and slightly easier to understand.
Extra opinions are more than welcome. David. Le mardi 7 janvier 2020 22:42:45 UTC+1, Jonathan Kliem a écrit : > > Dear all, > > currently the sparse graph backend keeps a reversed copy of the graph. > > However, the SparseGraph itself does not have access to it and thus the > reversed structure should be moved there for obvious optimizations. See > #28904 <https://trac.sagemath.org/ticket/28904>. > > As the sparse graph backend is the only backend actually using the > reversed structure, it would make sense to remove this. > > However, it is very well possible that people use the unsafe methods of > SparseGraph directly and code will break. > E.g. in graphs/trees.py the undirected trees are generated by manually > adding an arc in each direction. > > I think, if we remove the reversed graph attribute in CGraph altogether, > people are more likely to catch on that something changed. > But in an undirected graph it can very well happen that they add two edges > instead of one (as they used to add one arc for each direction). > > Any thoughts? > > Jonathan > -- You received this message because you are subscribed to the Google Groups "sage-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/sage-devel/e011a503-43e2-405b-a350-aa6e0adf5d31%40googlegroups.com.