Open dcoudert opened 1 year ago
G=Graph([('\x03', '\x05'), ('\x01', 4), ('\x06', 4), ('\x05', 0), (0, 5), ('\x04', 0), (1, 2), (1, 4), ('\x04', 1), ('\x05', 2), ('\x02', 2), ('\x03', 3), ('\x01', 3), ('\x06', 3), ('\x03', 5), ('\x04', 5), ('\x01', '\x02'), ('\x02', '\x06')])
r=G.is_perfect()
TypeError Traceback (most recent call last) Cell In [1], line 2
This is with different traceback from the is_perfect()
testcase
G=graphs.CompleteGraph(4)
H=Graph([("A",1)])
G.subgraph_search(H)
11369 if sort:
> 11370 return sorted(self.vertex_iterator(degree=degree, vertex_property=vertex_property), key=key)
Thanks for reporting. With #35904 we have:
sage: G = Graph([('\x03', '\x05'), ('\x01', 4), ('\x06', 4), ('\x05', 0), (0, 5), ('\x04', 0), (1, 2), (1, 4), ('\x04', 1), ('\x05', 2), ('\x02', 2), ('\x03', 3), ('\x01', 3), ('\x06', 3), ('\x03', 5), ('\x04', 5), ('\x01', '\x02'), ('\x02', '\x06')])
sage: G.is_perfect()
False
and
sage: G = graphs.CompleteGraph(4)
sage: H = Graph([("A",1)])
sage: G.subgraph_search(H)
Subgraph of (Complete graph): Graph on 2 vertices
Have you checked regressions? You allow new codepaths, which were not reachable on python3.
Have you checked regressions? You allow new codepaths, which were not reachable on python3.
I'm not sure to understand your question. With #35904, we only make SubgraphSearch
robust to vertex labels. So the overall code is more robust. Have a look at the code.
I mean are you sure you don't introduce new bugs in extreme cases?
Well, previous doctests are satisfied and I added new doctests... Furthermore, the referees may ask for further changes.
I don't have sage-latest and am working on 9.6 from fedora and check the testcases on sagecell.
Is there another place to check testcases on sage-latest?
You may use cocalc.com. It should use the last release (10.0).
Is there an existing issue for this?
Problem Description
Several methods are failing when the vertices of the graph are of incomparable type. For instance:
Proposed Solution
Stop sorting vertices by default whenever possible and add relevant tests / documentation when necessary.
Alternatives Considered
None.
Additional Information
Related issues / PR:
22349
35889
35891
35903
35904
35956
36232
Relevant discussions on sage-devel: