Remove debugging code.

This commit is contained in:
Matthias Vallentin 2013-08-03 16:55:29 +02:00
parent c526ebcfeb
commit e226781a3c

View file

@ -11,9 +11,6 @@
#include "../util.h" #include "../util.h"
// TODO: remove code within these ifdefs after debugging.
#define BLOOMFILTER_DEBUG
using namespace probabilistic; using namespace probabilistic;
BloomFilter::BloomFilter() BloomFilter::BloomFilter()
@ -147,17 +144,8 @@ void BasicBloomFilter::Add(const HashKey* key)
{ {
Hasher::digest_vector h = hasher->Hash(key); Hasher::digest_vector h = hasher->Hash(key);
#ifdef BLOOMFILTER_DEBUG
for ( size_t i = 0; i < h.size(); ++i )
{
BitVector::size_type pos = h[i] % bits->Size();
fprintf(stderr, "setting bit %lu (was %u)\n", pos, !!(*bits)[pos]);
bits->Set(pos);
}
#else
for ( size_t i = 0; i < h.size(); ++i ) for ( size_t i = 0; i < h.size(); ++i )
bits->Set(h[i] % bits->Size()); bits->Set(h[i] % bits->Size());
#endif
} }
size_t BasicBloomFilter::Count(const HashKey* key) const size_t BasicBloomFilter::Count(const HashKey* key) const