Commit 0d1c08e6 authored by Alexandre Duret-Lutz's avatar Alexandre Duret-Lutz
Browse files

powerset: tiny speedup

* src/tgbaalgos/ Replace std::deque by vector, and take
the return of aut->out(s) by reference.
parent 2377523c
......@@ -21,7 +21,6 @@
// along with this program. If not, see <>.
#include <set>
#include <deque>
#include <iterator>
#include <vector>
#include "powerset.hh"
......@@ -46,7 +45,7 @@ namespace spot
typedef power_map::power_state power_state;
typedef std::map<power_map::power_state, int> power_set;
typedef std::deque<power_map::power_state> todo_list;
typedef std::vector<power_map::power_state> todo_list;
power_set seen;
todo_list todo;
......@@ -63,12 +62,12 @@ namespace spot
while (!todo.empty())
power_state src = todo.front();
power_state src = todo.back();
// Compute all variables occurring on outgoing arcs.
bdd all_vars = bddtrue;
for (auto s: src)
for (auto i: aut->out(s))
for (auto& i: aut->out(s))
all_vars &= bdd_support(i.cond);
bdd all_conds = bddtrue;
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