Commit d033633b authored by Thibaud Michaud's avatar Thibaud Michaud Committed by Alexandre Duret-Lutz
Browse files

are_isomorphic: do not try to map initial state to a non-initial state

* src/tgbaalgos/ Here.
parent 099d3d72
......@@ -86,6 +86,9 @@ namespace
// the union of in and out is the same.
state2class[i] = spot::wang32_hash(hashin[i]) ^ hashout[i];
// XOR the initial state's hash with a pseudo random value so that it is
// in its own class.
state2class[a->get_init_state_number()] ^= 2654435761U;
return state2class;
......@@ -100,8 +103,9 @@ namespace
for (unsigned s = 0; s < n; ++s)
class_t c1 = state2class[s];
(*(class2states.emplace(c1, std::vector<unsigned>()).first)).second.
auto& states =
class2states.emplace(c1, std::vector<unsigned>()).first->second;
return class2states;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment