HOG2
utils
MinBloom.h
Go to the documentation of this file.
1
//
2
// MinBloom.h
3
// hog2 glut
4
//
5
// Created by Nathan Sturtevant on 5/4/14.
6
// Copyright (c) 2014 University of Denver. All rights reserved.
7
//
8
9
#ifndef __hog2_glut__MinBloom__
10
#define __hog2_glut__MinBloom__
11
12
#include <iostream>
13
#include "
FourBitArray.h
"
14
15
class
MinBloomFilter
{
16
public
:
17
MinBloomFilter
(uint64_t numItems,
double
targetHitRate,
bool
save,
bool
zero=
true
);
18
MinBloomFilter
(uint64_t
filterSize
,
int
numHash
,
bool
save,
bool
zero=
true
);
19
MinBloomFilter
(uint64_t
filterSize
,
int
numHash
,
const
char
*loadPrefix);
20
~MinBloomFilter
();
21
void
Analyze
();
22
void
Insert
(uint64_t item,
int
depth);
23
int
Contains
(uint64_t item);
24
uint64_t
GetStorage
() {
return
filterSize
; }
25
int
GetNumHash
() {
return
numHash
; }
26
void
Load
();
27
private
:
28
uint64_t
Hash
(uint64_t value,
int
which);
29
int
numHash
;
30
bool
saveAtExit
;
31
uint64_t
filterSize
;
32
FourBitArray
*
bits
;
33
};
34
35
#endif
/* defined(__hog2_glut__MinBloom__) */
MinBloomFilter::~MinBloomFilter
~MinBloomFilter()
Definition:
MinBloom.cpp:88
MinBloomFilter::saveAtExit
bool saveAtExit
Definition:
MinBloom.h:30
FourBitArray
Definition:
FourBitArray.h:16
MinBloomFilter::numHash
int numHash
Definition:
MinBloom.h:29
FourBitArray.h
MinBloomFilter::GetStorage
uint64_t GetStorage()
Definition:
MinBloom.h:24
MinBloomFilter::Load
void Load()
Definition:
MinBloom.cpp:113
MinBloomFilter::Insert
void Insert(uint64_t item, int depth)
Definition:
MinBloom.cpp:121
MinBloomFilter::GetNumHash
int GetNumHash()
Definition:
MinBloom.h:25
MinBloomFilter::bits
FourBitArray * bits
Definition:
MinBloom.h:32
MinBloomFilter::filterSize
uint64_t filterSize
Definition:
MinBloom.h:31
MinBloomFilter
Definition:
MinBloom.h:15
MinBloomFilter::Contains
int Contains(uint64_t item)
Definition:
MinBloom.cpp:131
MinBloomFilter::MinBloomFilter
MinBloomFilter(uint64_t numItems, double targetHitRate, bool save, bool zero=true)
Definition:
MinBloom.cpp:55
MinBloomFilter::Analyze
void Analyze()
Definition:
MinBloom.cpp:101
MinBloomFilter::Hash
uint64_t Hash(uint64_t value, int which)
Definition:
MinBloom.cpp:144
Generated by
1.8.17