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
Add the Habib Maurer algorithm for modular decomposition to graphs #26496
Comments
Commit: |
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:5
Some comments:
|
comment:6
Thanks for looking at this. Your first three points are accurate, and I will fix things accordingly (I'll also change the other places where I use sorted tuples to identify subtrees). I wasn't aware of
|
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:8
I also added a bunch of other stuff in that commit, replaced the sorted lists with frozen sets, added |
comment:10
Most of the new code is to support the random tests. |
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:13
A few comments:
- pieces = DisjointSet([frozenset(e) for e in graph.edges(labels=False, sort=False)])
- for v in graph.vertices():
+ pieces = DisjointSet(frozenset(e) for e in graph.edge_iterator(labels=False))
+ for v in graph:
- if graph.order() == 0:
+ if not graph.order(): - elif not graph.complement().is_connected():
- root = create_series_node()
- root.children = [habib_maurer_algorithm(graph.subgraph(vertices=sg), g_classes)
- for sg in graph.complement().connected_components()]
- return root
+ g_comp = graph.complement()
+ if g_comp.is_connected():
+ root = create_series_node()
+ root.children = [habib_maurer_algorithm(graph.subgraph(vertices=sg), g_classes)
+ for sg in g_comp.connected_components()]
+ return root - if g_classes == None:
+ if g_classes is None: - vertex_set = frozenset(graph.vertices())
+ vertex_set = frozenset(G.vertex_iterator())
|
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:15
I thank you for all the work that you've done to improve this. A few more silly questions. I'm not fond of using frozensets of two numbers to identify edges of an undirected graph, but do not see any other way to work it without sorting. Also the last patchbot run complained of non-ascii characters: I cannot find any. There were also complaints from the coverage tests of 6 missing doctests. Is there any way to figure out exactly what it wants? |
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:61
I fixed some issues. Now the html documentation should build properly. More can certainly be done in another ticket... |
comment:62
red branch |
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:64
fixed. |
comment:65
now its green ;) |
comment:66
please do not use EDIT: or do not wrap them if this does not work (for import lines) |
comment:68
I used some |
comment:69
I've just launched my bot on it. |
Changed reviewer from David Coudert to David Coudert, Frédéric Chapoton |
comment:70
ok, let us say "good to go" |
comment:71
Thanks. |
comment:72
moving milestone to 9.0 (after release of 8.9) |
Changed branch from public/graphs/26496_habib_maurer_algorithm_for_modular_decomposition to |
Experience has shown that the modern modular decomposition linear algorithms are extremely tricky to implement correctly. Adding an implementation of the much more straightforward O(n3)algorithm from Habib and Maurer "On the X-Join decomposition for undirected graphs" would give us a baseline to test against.
Also move modular decomposition into the graph decompositions directory.
Component: graph theory
Author: David Einstein
Branch/Commit:
c910704
Reviewer: David Coudert, Frédéric Chapoton
Issue created by migration from https://trac.sagemath.org/ticket/26496
The text was updated successfully, but these errors were encountered: