* src/tgbaalgos/gtec/nsheap.hh, src/tgbaalgos/gtec/nsheap.cc

(index_and_insert): New function.
* src/tgbaalgos/gtec/gtec.cc (couvreur99_check_shy::check): Rewrite.
(couvreur99_check_shy::clear_todo): New method.
* src/tgbaalgos/gtec/gtec.hh (couvreur99_check_shy::todo_item): New
struct.
* iface/gspn/ssp.cc (numbered_state_heap_ssp_semi::index_and_insert):
New method.
This commit is contained in:
Alexandre Duret-Lutz 2004-12-29 15:29:26 +00:00
parent 988dbbd367
commit 93f77c5782
6 changed files with 245 additions and 134 deletions

View file

@ -781,6 +781,19 @@ namespace spot
return res;
}
virtual int&
index_and_insert(const state*& s)
{
std::pair<hash_type::iterator, bool> r
= h.insert(hash_type::value_type(s, 0));
if (!r.second)
{
delete s;
s = r.first->first;
}
return r.first->second;
}
virtual void
insert(const state* s, int index)
{
@ -945,7 +958,7 @@ namespace spot
{
State* succ_tgba_ = 0;
size_t size_tgba_ = 0;
succ_queue& queue = todo.back().second;
succ_queue& queue = todo.back().q;
Diff_succ(old_state->left(), new_state->left(),
&succ_tgba_, &size_tgba_);