From 534447650aabad1b3a241ec1aa84843f2f63a2c8 Mon Sep 17 00:00:00 2001 From: Morten Konggaard Schou Date: Tue, 23 Jun 2020 20:29:24 +0200 Subject: [PATCH] Use FIFO-queue for transitions in post* (As a test) --- src/pdaaal/Solver.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pdaaal/Solver.h b/src/pdaaal/Solver.h index 77810cf..ae5b0ef 100644 --- a/src/pdaaal/Solver.h +++ b/src/pdaaal/Solver.h @@ -525,7 +525,7 @@ namespace pdaaal { const auto n_automata_states = automaton.states().size(); std::unordered_set edges; - std::stack workset; + std::queue workset; std::vector>> rel1(n_automata_states); // faster access for lookup _from -> (_to, _label) std::vector> rel2(n_automata_states - n_Q); // faster access for lookup _to -> _from (when _label is uint32_t::max) @@ -575,7 +575,7 @@ namespace pdaaal { // pop t = (q, y, q') from workset (line 6) temp_edge_t t; - t = workset.top(); + t = workset.front(); workset.pop(); // rel = rel U {t} (line 8) (membership test on line 7 is done in insert_edge). rel1[t._from].emplace_back(t._to, t._label);