gatb.core-API-0.0.0
|
#include <Bloom.hpp>
Public Member Functions | |
virtual | ~IBloom () |
virtual u_int8_t *& | getArray ()=0 |
virtual u_int64_t | getSize ()=0 |
virtual u_int64_t | getBitSize ()=0 |
virtual size_t | getNbHash () const =0 |
virtual bool | contains (const Item &item)=0 |
virtual std::bitset< 4 > | contains4 (const Item &item, bool right)=0 |
virtual std::bitset< 8 > | contains8 (const Item &item)=0 |
virtual std::string | getName () const =0 |
virtual unsigned long | weight ()=0 |
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 Item &item)=0 |
virtual void | insert (const std::vector< Item > &items, size_t length=0) |
virtual void | insert (const Item *items, size_t length) |
virtual void | flush ()=0 |
Public Member Functions inherited from SmartPointer | |
void | use () |
void | forget () |
Additional Inherited Members | |
Protected Member Functions inherited from SmartPointer | |
SmartPointer () | |
virtual | ~SmartPointer () |
Bloom interface.
We define a Bloom filter has a container (something that tells whether an item is here or not) and a bag (something we can put items into).
This interface has a template argument corresponding to the type of items to be inserted in the filter. Note that implementations should provide hash functions supporting the template type.
As expected, there is no Iterable interface here because it is not possible to enumerate the items inserted in a Bloom filter only with the Bloom filter information.
|
inlinevirtual |
Destructor.
|
pure virtual |
Tells whether an item is in the Bloom filter
[in] | item | : item to test. |
Implements Container< Item >.
Implemented in BloomNeighborCoherent< Item >, BloomCacheCoherent< Item >, BloomNull< Item >, and BloomContainer< Item >.
|
pure virtual |
Tells whether the 4 neighbors of the given item are in the Bloom filter. The 4 neighbors are computed from the given item by adding successively nucleotides 'A', 'C', 'T' and 'G' Note: some implementation may not provide this service.
[in] | item | : starting item from which neighbors are computed. |
[in] | right | : if true, successors are computed, otherwise predecessors are computed. |
Implemented in BloomExtendedNeighborCoherent< Item >, BloomNeighborCoherent< Item >, BloomNull< Item >, and BloomContainer< Item >.
|
pure virtual |
Tells whether the 8 neighbors of the given item are in the Bloom filter. A default implementation may be two calls to contains4 with right==true and right==left and by concatenating the two bitsets. Note: some implementation may not provide this service.
[in] | item | : starting item from which neighbors are computed. |
Implemented in BloomNeighborCoherent< Item >, BloomNull< Item >, and BloomContainer< Item >.
|
pure virtual |
Get the raw bit set of the Bloom filter.
Implemented in BloomNull< Item >, and BloomContainer< Item >.
|
pure virtual |
Get the size of the Bloom filter (in bits).
Implemented in BloomExtendedNeighborCoherent< Item >, BloomNeighborCoherent< Item >, BloomCacheCoherent< Item >, BloomNull< Item >, and BloomContainer< Item >.
|
pure virtual |
Get the name of the implementation class.
Implemented in BloomExtendedNeighborCoherent< Item >, BloomNeighborCoherent< Item >, BloomCacheCoherent< Item >, BloomSynchronized< Item >, BloomNull< Item >, Bloom< Item >, and BloomContainer< Item >.
|
pure virtual |
Get the number of hash functions used for the Bloom filter.
Implemented in BloomNull< Item >, and BloomContainer< Item >.
|
pure virtual |
Get the size of the Bloom filter (in bytes).
Implemented in BloomNull< Item >, and BloomContainer< Item >.
|
pure virtual |
Return the number of 1's in the Bloom (nibble by nibble)
Implemented in BloomCacheCoherent< Item >, BloomNull< Item >, and Bloom< Item >.