1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-01-18 12:52:44 +01:00

sys/bloom: changed doc from bytes -> bits

This commit is contained in:
Cenk Gündoğan 2015-01-29 15:06:01 +01:00
parent 6715bccf5b
commit 5c77530da4
2 changed files with 5 additions and 5 deletions

View File

@ -140,7 +140,7 @@ typedef uint32_t (*hashfp_t)(const uint8_t *, int len);
* @brief bloom_t bloom filter object
*/
typedef struct {
/** number of bytes in the bloom array */
/** number of bits in the bloom array */
size_t m;
/** number of hash functions */
size_t k;
@ -155,7 +155,7 @@ typedef struct {
*
* For best results, make 'size' a power of 2.
*
* @param size size of the bit array in the filter
* @param size size of the bit array of the filter in bits
* @param num_hashes the number of hash functions
* @param ... varg function pointers, use hashfp_t
*

View File

@ -16,7 +16,7 @@
#include "tests-bloom-sets.h"
#define TESTS_BLOOM_BYTES (128)
#define TESTS_BLOOM_BITS (128)
#define TESTS_BLOOM_HASHF (6)
#define TESTS_BLOOM_PROB_IN_FILTER (4)
#define TESTS_BLOOM_NOT_IN_FILTER (996)
@ -35,7 +35,7 @@ static void load_dictionary_fixture(void)
static void set_up_bloom(void)
{
bloom = bloom_new(TESTS_BLOOM_BYTES, TESTS_BLOOM_HASHF, fnv_hash, sax_hash,
bloom = bloom_new(TESTS_BLOOM_BITS, TESTS_BLOOM_HASHF, fnv_hash, sax_hash,
sdbm_hash, djb2_hash, kr_hash, dek_hash, rotating_hash,
one_at_a_time_hash);
}
@ -47,7 +47,7 @@ static void tear_down_bloom(void)
static void test_bloom_parameters_bytes_hashf(void)
{
TEST_ASSERT_EQUAL_INT(TESTS_BLOOM_BYTES, bloom->m);
TEST_ASSERT_EQUAL_INT(TESTS_BLOOM_BITS, bloom->m);
TEST_ASSERT_EQUAL_INT(TESTS_BLOOM_HASHF, bloom->k);
}