*** empty log message ***
This commit is contained in:
parent
ffc2d22424
commit
f2881c8f2e
5
FAQ.t2t
5
FAQ.t2t
@ -25,6 +25,11 @@ one is executed?
|
||||
the cmph_config_set_hashfuncs. Therefore, the default hash function
|
||||
is reset when you call the cmph_config_set_algo function.
|
||||
|
||||
- What do I do when the following error is got?
|
||||
- Error: **error while loading shared libraries: libcmph.so.0: cannot open shared object file: No such file ordirectory**
|
||||
|
||||
- Solution: type **export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib/** at the shell or put that shell command
|
||||
in your .profile file or in the /etc/profile file.
|
||||
|
||||
%!include: ALGORITHMS.t2t
|
||||
|
||||
|
29
README.t2t
29
README.t2t
@ -51,7 +51,7 @@ The CMPH Library encapsulates the newest and more efficient algorithms in an eas
|
||||
%txt% - BMZ Algorithm.
|
||||
A very fast external memory based algorithm for constructing minimal perfect hash functions
|
||||
for sets in the order of billion of keys in linear time. The resulting functions are not order preserving and
|
||||
can be stored using just 8.1 bits per key. **This algorithm is available just in the CVS for while**.
|
||||
can be stored using just 8.1 bits per key.
|
||||
%html% - [CHM Algorithm chm.html].
|
||||
%txt% - CHM Algorithm.
|
||||
An algorithm based on acyclic random graphs to construct minimal
|
||||
@ -61,6 +61,15 @@ The CMPH Library encapsulates the newest and more efficient algorithms in an eas
|
||||
%html% [Click Here comparison.html] to see a comparison of the supported algorithms.
|
||||
|
||||
|
||||
----------------------------------------
|
||||
|
||||
==News for version 0.5==
|
||||
|
||||
- A thread safe vector adapter has been added.
|
||||
- [A new algorithm for sets in the order of billion of keys that requires approximately 8.1 bits per key to store the resulting MPHFs. brz.html]
|
||||
- All reported bugs and suggestions have been corrected and included as well.
|
||||
|
||||
|
||||
----------------------------------------
|
||||
|
||||
==News for version 0.4==
|
||||
@ -88,7 +97,7 @@ Using cmph is quite simple. Take a look.
|
||||
|
||||
```
|
||||
#include <cmph.h>
|
||||
|
||||
#include <string.h>
|
||||
// Create minimal perfect hash function from in-memory vector
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
@ -97,7 +106,7 @@ int main(int argc, char **argv)
|
||||
"ffffffffff", "gggggggggg", "hhhhhhhhhh", "iiiiiiiiii", "jjjjjjjjjj"};
|
||||
unsigned int nkeys = 10;
|
||||
// Source of keys
|
||||
cmph_io_adapter_t *source = cmph_io_vector_adapter(vector, nkeys);
|
||||
cmph_io_adapter_t *source = cmph_io_vector_adapter((char **)vector, nkeys);
|
||||
|
||||
//Create minimal perfect hash function using the default (chm) algorithm.
|
||||
cmph_config_t *config = cmph_config_new(source);
|
||||
@ -110,7 +119,7 @@ int main(int argc, char **argv)
|
||||
fprintf(stderr, "Id:%u\n", id);
|
||||
//Destroy hash
|
||||
cmph_destroy(hash);
|
||||
free(source);
|
||||
cmph_io_vector_adapter_destroy(source);
|
||||
return 0;
|
||||
}
|
||||
```
|
||||
@ -120,7 +129,7 @@ Download [vector_adapter_ex1.c examples/vector_adapter_ex1.c]. This example does
|
||||
```
|
||||
#include <cmph.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#include <string.h>
|
||||
// Create minimal perfect hash function from in-disk keys using BMZ algorithm
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
@ -146,7 +155,7 @@ int main(int argc, char **argv)
|
||||
fprintf(stderr, "Id:%u\n", id);
|
||||
//Destroy hash
|
||||
cmph_destroy(hash);
|
||||
free(source);
|
||||
cmph_io_nlfile_adapter_destroy(source);
|
||||
fclose(keys_fd);
|
||||
return 0;
|
||||
}
|
||||
@ -176,14 +185,16 @@ utility.
|
||||
|
||||
|
||||
```
|
||||
usage: cmph [-v] [-h] [-V] [-k nkeys] [-f hash_function] [-g [-c value][-s seed] ] [-m file.mph] [-a algorithm] keysfile
|
||||
usage: cmph [-v] [-h] [-V] [-k nkeys] [-f hash_function] [-g [-c value][-s seed] ] [-a algorithm] [-M memory_in_MB] [-b BRZ_parameter] [-d tmp_dir] [-m file.mph] keysfile
|
||||
Minimum perfect hashing tool
|
||||
|
||||
-h print this help message
|
||||
-c c value that determines the number of vertices in the graph
|
||||
-a algorithm - valid values are
|
||||
* bmz
|
||||
* bmz8
|
||||
* chm
|
||||
* brz
|
||||
-f hash function (may be used multiple times) - valid values are
|
||||
* djb2
|
||||
* fnv
|
||||
@ -195,7 +206,11 @@ utility.
|
||||
-g generation mode
|
||||
-s random seed
|
||||
-m minimum perfect hash function file
|
||||
-M main memory availability (in MB)
|
||||
-d temporary directory used in brz algorithm
|
||||
-b parmeter of BRZ algorithm to make the maximal number of keys in a bucket lower than 256
|
||||
keysfile line separated file with keys
|
||||
|
||||
```
|
||||
|
||||
==Additional Documentation==
|
||||
|
Loading…
Reference in New Issue
Block a user