virtual void clear() = 0;
virtual void merge(AbstractBloomFilter * other_filter) = 0;
virtual void set(Addr addr) = 0;
- virtual void unset(Addr addr) = 0;
+
+ /**
+ * Perform the filter specific function to clear the corresponding
+ * entries (can be multiple) of an address. By default a bloom
+ * filter does not support element deletion.
+ *
+ * @param addr The address being parsed.
+ */
+ virtual void unset(Addr addr) {};
virtual bool isSet(Addr addr) = 0;
virtual int getCount(Addr addr) = 0;
void clear();
void merge(AbstractBloomFilter * other_filter);
void set(Addr addr);
- void unset(Addr addr);
+ void unset(Addr addr) override;
bool isSet(Addr addr);
int getCount(Addr addr);
m_filter[c1] = 1;
}
-void
-BulkBloomFilter::unset(Addr addr)
-{
- // not used
-}
-
bool
BulkBloomFilter::isSet(Addr addr)
{
void clear();
void merge(AbstractBloomFilter * other_filter);
void set(Addr addr);
- void unset(Addr addr);
bool isSet(Addr addr);
int getCount(Addr addr);
}
}
-void
-H3BloomFilter::unset(Addr addr)
-{
- panic("ERROR: Unset should never be called in a Bloom filter");
-}
-
bool
H3BloomFilter::isSet(Addr addr)
{
void clear();
void merge(AbstractBloomFilter * other_filter);
void set(Addr addr);
- void unset(Addr addr);
bool isSet(Addr addr);
int getCount(Addr addr);
void clear();
void merge(AbstractBloomFilter * other_filter);
void set(Addr addr);
- void unset(Addr addr);
+ void unset(Addr addr) override;
bool isSet(Addr addr);
int getCount(Addr addr);
}
}
-void
-MultiBitSelBloomFilter::unset(Addr addr)
-{
- panic("ERROR: Unset should never be called in a Bloom filter");
-}
-
bool
MultiBitSelBloomFilter::isSet(Addr addr)
{
void clear();
void merge(AbstractBloomFilter * other_filter);
void set(Addr addr);
- void unset(Addr addr);
bool isSet(Addr addr);
int getCount(Addr addr);
}
-void
-MultiGrainBloomFilter::unset(Addr addr)
-{
- // not used
-}
-
bool
MultiGrainBloomFilter::isSet(Addr addr)
{
void clear();
void merge(AbstractBloomFilter * other_filter);
void set(Addr addr);
- void unset(Addr addr);
bool isSet(Addr addr);
int getCount(Addr addr);
void clear();
void merge(AbstractBloomFilter * other_filter);
void set(Addr addr);
- void unset(Addr addr);
+ void unset(Addr addr) override;
bool isSet(Addr addr);
int getCount(Addr addr);