Skip to content
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

Fix bug in digraph homom. finder #290

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/homos-graphs.c
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ static void init_bliss_graph_from_digraph(Digraph const* const digraph,
uint16_t out_color = 0;
uint16_t const n = digraph->nr_vertices;
for (uint16_t i = 0; i < n; i++) {
out_color = (colors[i] > out_color ? colors[i] + 1 : out_color);
out_color = (colors[i] >= out_color ? colors[i] + 1 : out_color);
bliss_digraphs_change_color(bg, i, colors[i]);
}
uint16_t const in_color = out_color + 1;
Expand Down Expand Up @@ -163,7 +163,7 @@ static BlissGraph* new_bliss_graph_from_digraph(Digraph const* const digraph,
uint16_t const n = digraph->nr_vertices;
bg = bliss_digraphs_new(0);
for (uint16_t i = 0; i < n; i++) {
out_color = (colors[i] > out_color ? colors[i] + 1 : out_color);
out_color = (colors[i] >= out_color ? colors[i] + 1 : out_color);
bliss_digraphs_add_vertex(bg, colors[i]);
}
uint16_t const in_color = out_color + 1;
Expand Down Expand Up @@ -233,6 +233,7 @@ static void bliss_hook(void* user_param_arg, // perm_coll!
Perm p = new_perm(PERM_DEGREE);
unsigned int const min = (N < PERM_DEGREE ? N : PERM_DEGREE);
for (uint16_t i = 0; i < min; i++) {
DIGRAPHS_ASSERT(aut[i] < min);
p[i] = aut[i];
}
for (uint16_t i = min; i < PERM_DEGREE; i++) {
Expand Down