gatb.core-API-1.4.2
Bloom< Item > Class Template Reference

Bloom filter implementation. More...

#include <Bloom.hpp>

Inheritance diagram for Bloom< Item >:
Inheritance graph

Public Member Functions

 Bloom (u_int64_t tai_bloom, size_t nbHash=4)
 
void insert (const Item &item)
 
void flush ()
 
std::string getName () const
 
void dump (const char *filename)
 
unsigned long weight ()
 
- Public Member Functions inherited from BloomContainer< Item >
 BloomContainer (u_int64_t tai_bloom, size_t nbHash=4)
 
virtual ~BloomContainer ()
 
size_t getNbHash () const
 
bool contains (const Item &item)
 
virtual std::bitset< 4 > contains4 (const Item &item, bool right)
 
virtual std::bitset< 8 > contains8 (const Item &item)
 
virtual u_int8_t *& getArray ()
 
virtual u_int64_t getSize ()
 
virtual u_int64_t getBitSize ()
 
- Public Member Functions inherited from IBloom< Item >
virtual ~IBloom ()
 
- Public Member Functions inherited from Container< Item >
virtual ~Container ()
 
- Public Member Functions inherited from ISmartPointer
virtual ~ISmartPointer ()
 
- Public Member Functions inherited from Bag< Item >
virtual void insert (const std::vector< Item > &items, size_t length=0)
 
virtual void insert (const Item *items, size_t length)
 
- Public Member Functions inherited from SmartPointer
void use ()
 
void forget ()
 

Additional Inherited Members

- Protected Member Functions inherited from SmartPointer
 SmartPointer ()
 
virtual ~SmartPointer ()
 

Detailed Description

template<typename Item>
class gatb::core::tools::collections::impl::Bloom< Item >

Bloom filter implementation.

Constructor & Destructor Documentation

Bloom ( u_int64_t  tai_bloom,
size_t  nbHash = 4 
)
inline

Constructor.

Parameters
[in]tai_bloom: size (in bits) of the bloom filter.
[in]nbHash: number of hash functions to use

Member Function Documentation

void dump ( const char *  filename)
inline

Dump the Bloom filter bitset into a file. OBSOLETE

Parameters
[in]filename: file where to dump the bitset.
void flush ( )
inlinevirtual

Flush the current content. May be useful for implementation that uses a cache.

Implements Bag< Item >.

std::string getName ( ) const
inlinevirtual

Get the name of the implementation class.

Returns
the class name.

Implements BloomContainer< Item >.

Reimplemented in BloomExtendedNeighborCoherent< Item >, BloomNeighborCoherent< Item >, BloomCacheCoherent< Item >, and BloomSynchronized< Item >.

void insert ( const Item &  item)
inlinevirtual
unsigned long weight ( )
inlinevirtual

Return the number of 1's in the Bloom (nibble by nibble)

Returns
the weight of the Bloom filter

Implements IBloom< Item >.

Reimplemented in BloomCacheCoherent< Item >.


The documentation for this class was generated from the following file: