Commit 64cdd1ad authored by Alexandre Lewkowicz's avatar Alexandre Lewkowicz Committed by Alexandre Duret-Lutz
Browse files

safra: Fix the nesting comparision function

* src/twaalgos/safra.cc, src/twaalgos/safra.hh: Here.
parent ebe03cf3
......@@ -37,8 +37,8 @@ namespace spot
size_t i = 0;
for (; i < m; ++i)
{
if (lhs[i] < rhs[i])
return true;
if (lhs[i] != rhs[i])
return lhs[i] < rhs[i];
}
return lhs.size() > rhs.size();
}
......@@ -255,7 +255,7 @@ namespace spot
return nodes_ < other.nodes_;
}
void safra_state::print_debug(unsigned state_id)
void safra_state::print_debug(unsigned state_id) const
{
std::cerr << "State: " << state_id << "{ ";
for (auto& n: nodes_)
......
......@@ -43,7 +43,8 @@ namespace spot
typedef std::vector<std::pair<safra_state, unsigned>> succs_t;
bool operator<(const safra_state& other) const;
// Print each sub-state with their associated braces of a safra state
void print_debug(unsigned state_id);
void print_debug(unsigned state_id) const;
// Printh the number of states in each brace
safra_state(unsigned state_number, bool init_state = false);
// Given a certain transition_label, compute all the successors of that
// label, and return that new node.
......
Supports Markdown
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