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
clean generic_graph.py (part 11) - substructures #26675
Comments
Commit: |
New commits:
|
Branch pushed to git repo; I updated commit sha1. New commits:
|
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:4
rebase on 8.5.beta6 to help the patchbot. |
comment:5
LGTM overall. Do you have a test that shows this bug in |
comment:6
If I don't do this change in - if self.has_multiple_edges():
+ if self.allows_multiple_edges(): then I get:
Indeed, when the graph allows multiple edges, So the doctest is already here. |
comment:7
Okay, thanks. |
Reviewer: Travis Scrimshaw |
Changed branch from public/26675_generic_graph_part_11_substructures to |
We clean methods
subgraph
,_subgraph_by_adding
,_subgraph_by_deleting
,subgraph_search
,subgraph_search_count
,subgraph_search_iterator
,random_subgraph
,is_chordal
,is_circulant
,is_interval
,is_gallai_tree
,is_clique
,is_cycle
,is_independent_set
,is_subgraph
.PEP8 cleaning
avoid sortings in methods
_subgraph_by_adding
and_subgraph_by_deleting
and slightly speed up the methods by using sets instead of lists for checking membership.fix bug in
is_hamiltonian
for graphs on 2 vertices with multiple edges that is raised by the changes done in_subgraph_by_deleting
. Roughly, we were not testing ifself.allows_multiple_edges()
but ifself.has_multiple_edges()
. Consequently, in some situation we were returning edge(u, v, [l])
instead of(u, v, l)
, but(u, v, [l])
is not hashable! The changes done here are not conflicting with the changes done in clean generic_graph.py (part 8) - connectivity #26663.avoid comparison of vertex labels in
is_clique
using a mapping to integerssmall improvement in
is_independent_set
to avoid a copyCC: @tscrim @fchapoton
Component: graph theory
Author: David Coudert
Branch/Commit:
6591aab
Reviewer: Travis Scrimshaw
Issue created by migration from https://trac.sagemath.org/ticket/26675
The text was updated successfully, but these errors were encountered: