Expose capacity & tombstone count in hash table implementation
All checks were successful
Run tests / Run tests (push) Successful in 7m0s

This commit is contained in:
Nikita Lisitsa 2026-08-22 19:49:48 +03:00
parent aea5de0f6a
commit ce40f35ab2

View file

@ -294,6 +294,11 @@ namespace psemek::util
return storage_.capacity;
}
std::size_t tombstones() const
{
return tombstone_count_;
}
void reserve(std::size_t capacity)
{
ensure_capacity_for(capacity);
@ -544,6 +549,16 @@ namespace psemek::util
return impl_.size();
}
std::size_t capacity() const
{
return impl_.capacity();
}
std::size_t tombstones() const
{
return impl_.tombstones();
}
void reserve(std::size_t capacity)
{
impl_.reserve(capacity);
@ -725,6 +740,16 @@ namespace psemek::util
return impl_.size();
}
std::size_t capacity() const
{
return impl_.capacity();
}
std::size_t tombstones() const
{
return impl_.tombstones();
}
bool empty() const
{
return impl_.size() == 0;