Merge remote-tracking branch 'origin/topic/matthias/bloom-filter' into topic/robin/bloom-filter-merge

* origin/topic/matthias/bloom-filter:
  Support emptiness check on Bloom filters.
  Refactor Bloom filter merging.
  Add bloomfilter_clear() BiF.
This commit is contained in:
Robin Sommer 2013-07-24 15:39:50 -07:00
commit 23b352b702
11 changed files with 270 additions and 76 deletions

View file

@ -463,6 +463,17 @@ bool BitVector::Empty() const
return bits.empty();
}
bool BitVector::AllZero() const
{
for ( size_t i = 0; i < bits.size(); ++i )
{
if ( bits[i] )
return false;
}
return true;
}
BitVector::size_type BitVector::FindFirst() const
{
return find_from(0);