#include <BitmapDigest.h>
The range updates automatically to handle new inserts. As new inserts are added to the bitmap, the range is rolled forward to include the new value in the range. Earlier entries are zeroed out and forgotten. A bit position can always be computed as the modulus in the size of the digest.
Definition at line 76 of file BitmapDigest.h.
Public Member Functions | |
bool | contains (int item) |
check to see if an item is in the digest | |
int | insert (int item, int suppress=1) |
inserts an item | |
void | serialize (unsigned char *buffer) |
serializes the digest into the buffer | |
void | import (unsigned char *buffer) |
deserializes the buffer into the digest | |
int | size_compacted_in_bytes () |
returns the size of the digest in bytes (for serialization) | |
void | reset () |
resets the digest to empty | |
int | get_lowest_sequence () |
returns the lowest sequence represented (yes or no) in the digest | |
Public Attributes | |
flat_bitmap | bm |
the actual storage of the bitmap |
int bitmap_digest::insert | ( | int | item, | |
int | suppress = 1 | |||
) | [virtual] |
inserts an item
item | the item to insert | |
suppress | when feasible, tells the filter whether to suppress dropping values |
Implements digest.
Definition at line 106 of file BitmapDigest.cc.
References ADD_FUNC_SELECTORS, bm, contains(), bitmapy::last_seq, maceDebug, bitmapy::start_seq, and bitmapy::tab_size.
void bitmap_digest::serialize | ( | unsigned char * | buffer | ) | [virtual] |
void bitmap_digest::import | ( | unsigned char * | buffer | ) | [virtual] |