Skip to content

Commit 039879b

Browse files
committedDec 21, 2015
Add more comments
1 parent a4d3297 commit 039879b

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed
 

‎BloomFilter.h

+9-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,9 @@ class BloomFilter {
2525
HashFn hashFns[] = defaultHashFns,
2626
int numHashFns = sizeof(defaultHashFns)/sizeof(defaultHashFns[0]));
2727
~BloomFilter();
28+
// Sets the specified bit in the buffer
2829
void setBit(unsigned int bitLocation);
30+
// Checks if the specified bit is set in the buffer
2931
bool isBitSet(unsigned int bitLocation);
3032
// Adds the specified buffer to the bloom filter
3133
void add(const char *input, int len);
@@ -34,7 +36,7 @@ class BloomFilter {
3436
/**
3537
* Checks whether an element probably exists in the set, or definitely
3638
* doesn't.
37-
* @param str Either a string to check for existance or an array of the
39+
* @param sz Either a string to check for existance or an array of the
3840
* string's char codes. The main reason why you'd want to pass in a char
3941
* code array is because passing a string will use JS directly to get
4042
* the char codes which is very inneficient compared to calling into C++
@@ -56,10 +58,16 @@ class BloomFilter {
5658
bool substringExists(const char *data, int dataLen, int substringLength);
5759
bool substringExists(const char *sz, int substringLength);
5860

61+
/**
62+
* Obtains the buffer used as the bloom filter data
63+
*/
5964
const char * getBuffer() {
6065
return buffer;
6166
}
6267

68+
/**
69+
* Obtains the Bloom Filter's buffer size in bytes
70+
*/
6371
int getByteBufferSize() {
6472
return byteBufferSize;
6573
}

0 commit comments

Comments
 (0)
Please sign in to comment.