twa: introduce the state_map template alias

* spot/twa/twa.hh: Introduce the type.
* spot/taalgos/emptinessta.cc, spot/taalgos/emptinessta.hh,
spot/taalgos/minimize.cc, spot/taalgos/reachiter.cc,
spot/taalgos/reachiter.hh, spot/taalgos/tgba2ta.cc,
spot/twa/twasafracomplement.cc, spot/twaalgos/dtwasat.cc,
spot/twaalgos/emptiness.cc, spot/twaalgos/gtec/status.cc,
spot/twaalgos/gtec/status.hh, spot/twaalgos/gv04.cc,
spot/twaalgos/magic.cc, spot/twaalgos/minimize.cc,
spot/twaalgos/minimize.hh, spot/twaalgos/reachiter.cc,
spot/twaalgos/reachiter.hh, spot/twaalgos/se05.cc,
spot/twaalgos/tau03.cc, spot/twaalgos/tau03opt.cc: Use it.
This commit is contained in:
Alexandre Duret-Lutz 2016-01-28 13:15:48 +01:00
parent 6230f320bf
commit 9b95b697a5
21 changed files with 89 additions and 117 deletions

View file

@ -1,5 +1,5 @@
// -*- coding: utf-8 -*-
// Copyright (C) 2011, 2013, 2014, 2015 Laboratoire de recherche et
// Copyright (C) 2011, 2013, 2014, 2015, 2016 Laboratoire de recherche et
// développement de l'Epita (LRDE).
// Copyright (C) 2004, 2005 Laboratoire d'Informatique de Paris 6 (LIP6),
// département Systèmes Répartis Coopératifs (SRC), Université Pierre
@ -458,7 +458,7 @@ namespace spot
~explicit_magic_search_heap()
{
hash_type::const_iterator s = h.begin();
auto s = h.begin();
while (s != h.end())
{
// Advance the iterator before deleting the "key" pointer.
@ -470,7 +470,7 @@ namespace spot
color_ref get_color_ref(const state*& s)
{
hash_type::iterator it = h.find(s);
auto it = h.find(s);
if (it == h.end())
return color_ref(nullptr);
if (s != it->first)
@ -493,7 +493,7 @@ namespace spot
bool has_been_visited(const state* s) const
{
hash_type::const_iterator it = h.find(s);
auto it = h.find(s);
return (it != h.end());
}
@ -504,10 +504,7 @@ namespace spot
}
private:
typedef std::unordered_map<const state*, color,
state_ptr_hash, state_ptr_equal> hash_type;
hash_type h;
state_map<color> h;
};
class bsh_magic_search_heap