BRZ is working with FCH or BMZ8. BMZ8 is faster but the MPHFs for each bucket are larger

This commit is contained in:
fc_botelho
2006-08-07 16:37:49 +00:00
parent 8adabac1c9
commit 9144ecc809
3 changed files with 13 additions and 1 deletions

View File

@@ -28,7 +28,7 @@ brz_config_data_t *brz_config_new()
{
brz_config_data_t *brz = NULL;
brz = (brz_config_data_t *)malloc(sizeof(brz_config_data_t));
brz->algo = CMPH_BMZ8;
brz->algo = CMPH_FCH;
brz->b = 128;
brz->hashfuncs[0] = CMPH_HASH_JENKINS;
brz->hashfuncs[1] = CMPH_HASH_JENKINS;
@@ -108,6 +108,15 @@ void brz_config_set_b(cmph_config_t *mph, cmph_uint8 b)
brz->b = b;
}
void brz_config_set_algo(cmph_config_t *mph, CMPH_ALGO algo)
{
if (algo == CMPH_BMZ8 || algo == CMPH_FCH) // supported algorithms
{
brz_config_data_t *brz = (brz_config_data_t *)mph->data;
brz->algo = algo;
}
}
cmph_t *brz_new(cmph_config_t *mph, float c)
{
cmph_t *mphf = NULL;