structure (AbstractBloomFilter, external = "yes") {
void clear(int);
- void increment(Addr, int);
- void decrement(Addr, int);
void set(Addr, int);
void unset(Addr, int);
public:
virtual ~AbstractBloomFilter() {};
virtual void clear() = 0;
- virtual void increment(Addr addr) = 0;
- virtual void decrement(Addr addr) = 0;
virtual void merge(AbstractBloomFilter * other_filter) = 0;
virtual void set(Addr addr) = 0;
virtual void unset(Addr addr) = 0;
}
}
-void
-BlockBloomFilter::increment(Addr addr)
-{
- // Not used
-}
-
-void
-BlockBloomFilter::decrement(Addr addr)
-{
- // Not used
-}
-
void
BlockBloomFilter::merge(AbstractBloomFilter * other_filter)
{
~BlockBloomFilter();
void clear();
- void increment(Addr addr);
- void decrement(Addr addr);
void merge(AbstractBloomFilter * other_filter);
void set(Addr addr);
void unset(Addr addr);
}
}
-void
-BulkBloomFilter::increment(Addr addr)
-{
- // Not used
-}
-
-void
-BulkBloomFilter::decrement(Addr addr)
-{
- // Not used
-}
-
void
BulkBloomFilter::merge(AbstractBloomFilter * other_filter)
{
~BulkBloomFilter();
void clear();
- void increment(Addr addr);
- void decrement(Addr addr);
void merge(AbstractBloomFilter * other_filter);
void set(Addr addr);
void unset(Addr addr);
}
}
-void
-H3BloomFilter::increment(Addr addr)
-{
- // Not used
-}
-
-void
-H3BloomFilter::decrement(Addr addr)
-{
- // Not used
-}
-
void
H3BloomFilter::merge(AbstractBloomFilter *other_filter)
{
~H3BloomFilter();
void clear();
- void increment(Addr addr);
- void decrement(Addr addr);
void merge(AbstractBloomFilter * other_filter);
void set(Addr addr);
void unset(Addr addr);
}
}
-void
-LSB_CountingBloomFilter::increment(Addr addr)
-{
- int i = get_index(addr);
- if (m_filter[i] < m_count)
- m_filter[i] += 1;
-}
-
-
-void
-LSB_CountingBloomFilter::decrement(Addr addr)
-{
- int i = get_index(addr);
- if (m_filter[i] > 0)
- m_filter[i] -= 1;
-}
-
void
LSB_CountingBloomFilter::merge(AbstractBloomFilter * other_filter)
{
void
LSB_CountingBloomFilter::set(Addr addr)
{
- // TODO
+ int i = get_index(addr);
+ if (m_filter[i] < m_count)
+ m_filter[i] += 1;
}
void
LSB_CountingBloomFilter::unset(Addr addr)
{
- // TODO
+ int i = get_index(addr);
+ if (m_filter[i] > 0)
+ m_filter[i] -= 1;
}
bool
~LSB_CountingBloomFilter();
void clear();
- void increment(Addr addr);
- void decrement(Addr addr);
void merge(AbstractBloomFilter * other_filter);
void set(Addr addr);
void unset(Addr addr);
}
}
-void
-MultiBitSelBloomFilter::increment(Addr addr)
-{
- // Not used
-}
-
-
-void
-MultiBitSelBloomFilter::decrement(Addr addr)
-{
- // Not used
-}
-
void
MultiBitSelBloomFilter::merge(AbstractBloomFilter *other_filter)
{
~MultiBitSelBloomFilter();
void clear();
- void increment(Addr addr);
- void decrement(Addr addr);
void merge(AbstractBloomFilter * other_filter);
void set(Addr addr);
void unset(Addr addr);
}
}
-void
-MultiGrainBloomFilter::increment(Addr addr)
-{
- // Not used
-}
-
-
-void
-MultiGrainBloomFilter::decrement(Addr addr)
-{
- // Not used
-}
-
void
MultiGrainBloomFilter::merge(AbstractBloomFilter *other_filter)
{
~MultiGrainBloomFilter();
void clear();
- void increment(Addr addr);
- void decrement(Addr addr);
void merge(AbstractBloomFilter * other_filter);
void set(Addr addr);
void unset(Addr addr);
}
}
-void
-NonCountingBloomFilter::increment(Addr addr)
-{
- // Not used
-}
-
-void
-NonCountingBloomFilter::decrement(Addr addr)
-{
- // Not used
-}
-
void
NonCountingBloomFilter::merge(AbstractBloomFilter *other_filter)
{
~NonCountingBloomFilter();
void clear();
- void increment(Addr addr);
- void decrement(Addr addr);
void merge(AbstractBloomFilter * other_filter);
void set(Addr addr);
void unset(Addr addr);