* src/ltltest/randltl.cc: Include cassert.

* src/tgbaalgos/ndfs_result.hxx: Implement the spot::acss_statistics
interface.
* src/tgbaalgos/magic.cc, src/tgbaalgos/se05.cc, src/tgbaalgos/tau03.cc,
src/tgbaalgos/tau03opt.cc: Add to each heap class a method returning its
size.
This commit is contained in:
Denis Poitrenaud 2005-01-06 15:54:48 +00:00
parent 174b531f82
commit 603b49e216
7 changed files with 68 additions and 15 deletions

View file

@ -387,6 +387,11 @@ namespace spot
return (it != h.end());
}
int size() const
{
return h.size();
}
private:
typedef Sgi::hash_map<const state*, color,
@ -422,9 +427,9 @@ namespace spot
bsh_magic_search_heap(size_t s)
{
size = s;
h = new unsigned char[size];
memset(h, WHITE, size);
size_ = s;
h = new unsigned char[size_];
memset(h, WHITE, size_);
}
~bsh_magic_search_heap()
@ -435,7 +440,7 @@ namespace spot
color_ref get_color_ref(const state*& s)
{
size_t ha = s->hash();
return color_ref(&(h[ha%size]), ha%4);
return color_ref(&(h[ha%size_]), ha%4);
}
void add_new_state(const state* s, color c)
@ -453,11 +458,18 @@ namespace spot
bool has_been_visited(const state* s) const
{
size_t ha = s->hash();
return color((h[ha%size] >> ((ha%4)*2)) & 3U) != WHITE;
return color((h[ha%size_] >> ((ha%4)*2)) & 3U) != WHITE;
}
int size() const
{
// this method must return the number of state stored in the heap. Due
// to potential conflicts this size cannot be computed.
return 0;
}
private:
size_t size;
size_t size_;
unsigned char* h;
};