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
Boost Cuthill-McKee, King Ordering #18876
Comments
This comment has been minimized.
This comment has been minimized.
Changed keywords from none to Cuthill-McKee ordering, King ordering, bandwidth |
Author: Michele Borassi |
Commit: |
comment:3
This is the first draft for the inclusion of the Boost Cuthill-McKee and King orderings. I just wrote a post on sage-devel forum to ask if this algorithm could be useful for matrix analysis, and, in case, how to include it. |
comment:4
Some issues:
|
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:6
Hello!
Done!
Probably we need to use types.FunctionType, as we used types.MethodType when we were working with the dominator tree. However, I have troubles finding the right command (and I have very little experience with these routines). Nathann, can you help us?
Done, and added a doctest! |
comment:7
Note that you can simple write I did the following test and it's working ;)
Let see if Nathann has a good trick for adding the algorithm to the documentation of the bandwidth module. |
comment:8
Hello Michele, It seems that the easiest solution is to add an index of the methods as done for David. |
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:10
I'm not sure I understood well your comment: is this what you mean? |
comment:11
Exactly ;) |
Reviewer: David Coudert |
comment:12
For me the patch is now good to go (install, tests, doc, etc.). |
comment:13
Merge conflict |
comment:16
OK for me with last develop branch. |
comment:17
Still conflicts, probably #18868 |
comment:18
Volker, The develop branch we use is 6.8, and ticket #18868 is not in it. Consequently, and unless we are doing something wrong with git, we don't have any merge conflict (see below [1]). However, I'm not able to merge ticket #18868 on top of the current develop branch (see below [2])! So, can I set this ticket to positive review ? Best, [1] Trying this ticket on top of current develop branch, 6.8:
[2] Trying to merge ticket #18868 on top of current develop branch, 6.8:
|
comment:19
Just wait for beta0 (tonight, probably) |
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:21
Hello! I have merged with beta0, and I solved a conflict in bandwidth file. I have tested the whole graph part of the library, and all tests were passed. Hope now the conflict is solved! Thank you, Michele |
comment:23
Also working for me. |
comment:24
Just a tip: what is done here with
is more easily achieved with
|
Branch pushed to git repo; I updated commit sha1 and set ticket back to needs_review. New commits:
|
comment:26
Done! Replying to @nathanncohen:
|
comment:27
unless another merge problem arrives, this ticket is good to go. |
Changed branch from u/borassi/boost_cuthill_mckee__king_ordering to |
Uses Boost to compute Cuthill-McKee and King ordering of vertices: heuristically, these orderings are used to minimize the bandwidth of the graph.
The bandwidth bw(M) of a matrix M is the smallest integer k such that all non-zero entries of M are at distance k from the diagonal. The bandwidth bw(G) of an undirected graph G is the minimum bandwidth of the adjacency matrix of G, over all possible relabellings of its vertices.
Since computing the bandwidth of a graph is NP-hard, two heuristics were developed, in order to find a good ordering: Cuthill-McKee and King ordering. This ticket will include in Sage the implementation of these two heuristics (closing also ticket #16583, which asks for an implementation of Cuthill-McKee).
Depends on #18811
Depends on #18564
Depends on #18839
CC: @nathanncohen @dcoudert
Component: graph theory
Keywords: Cuthill-McKee ordering, King ordering, bandwidth
Author: Michele Borassi
Branch/Commit:
ecda30f
Reviewer: David Coudert
Issue created by migration from https://trac.sagemath.org/ticket/18876
The text was updated successfully, but these errors were encountered: