Re: [sage-devel] Re: Py3, sorting vertices of graph

2018-09-14 Thread David Coudert
Two more: - #26284 : deals with comparability.pyx, digraph.py, vertex_separation.pyx, cutwidth.pyx and connectivity.pyx - #26285: avoid comparison of vertex labels in MIPs of generic_graph. Le vendredi 14 septembre 2018 13:43:37 UTC+2, David Coudert a écrit : > > I'm working on reducin

Re: [sage-devel] Re: Py3, sorting vertices of graph

2018-09-14 Thread David Coudert
I'm working on reducing the number of places where we explicitly compare vertex labels. So far I'm focusing on MIPs. - #26274 : avoid comparison of vertex labels in MIP for file `graph_coloring.py` - #26282 : avoid comparison of vertex labels in MIP for file `graph.py` More to come,

Re: [sage-devel] Re: Py3, sorting vertices of graph

2018-09-07 Thread Erik Bray
On Thu, Sep 6, 2018 at 11:40 AM David Coudert wrote: > > Comparisons like u < v are used in many places in the code of graphs. > We can try to use hash(u) < hash(v) instead, but this is certainly not the > smartest solution. I have a long-outstanding proposal for a SafeSortable utility that woul

Re: [sage-devel] Re: Py3, sorting vertices of graph

2018-09-06 Thread Jori Mäntysalo
On Thu, 6 Sep 2018, John H Palmieri wrote: Also not ideal, but you could first try u < v, and if that fails, catch the error and use str(u) < str(v). But we can have Graph({'1': [1]}) and so not total order for str() of vertices. -- Jori Mäntysalo