blob: 8c12c9f0074492724d3107664978a53309273890 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
#ifndef PERFECT_HASH_MAP_H_
#define PERFECT_HASH_MAP_H_
#include <vector>
#include <boost/utility.hpp>
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#ifdef HAVE_CMPH
#include "cmph.h"
#endif
class PerfectHashFunction : boost::noncopyable {
public:
explicit PerfectHashFunction(const std::string& fname);
~PerfectHashFunction();
size_t operator()(const std::string& key) const;
size_t number_of_keys() const;
private:
#ifdef HAVE_CMPH
cmph_t *mphf_;
#endif
};
#endif
|