*** empty log message ***

This commit is contained in:
fc_botelho 2006-05-03 20:25:41 +00:00
parent 3578933d4a
commit c1aea5cc0f
2 changed files with 58 additions and 38 deletions

View File

@ -25,6 +25,11 @@ one is executed?
the cmph_config_set_hashfuncs. Therefore, the default hash function the cmph_config_set_hashfuncs. Therefore, the default hash function
is reset when you call the cmph_config_set_algo 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 %!include: ALGORITHMS.t2t

View File

@ -51,7 +51,7 @@ The CMPH Library encapsulates the newest and more efficient algorithms in an eas
%txt% - BMZ Algorithm. %txt% - BMZ Algorithm.
A very fast external memory based algorithm for constructing minimal perfect hash functions 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 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]. %html% - [CHM Algorithm chm.html].
%txt% - CHM Algorithm. %txt% - CHM Algorithm.
An algorithm based on acyclic random graphs to construct minimal 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. %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== ==News for version 0.4==
@ -88,7 +97,7 @@ Using cmph is quite simple. Take a look.
``` ```
#include <cmph.h> #include <cmph.h>
#include <string.h>
// Create minimal perfect hash function from in-memory vector // Create minimal perfect hash function from in-memory vector
int main(int argc, char **argv) int main(int argc, char **argv)
{ {
@ -97,7 +106,7 @@ int main(int argc, char **argv)
"ffffffffff", "gggggggggg", "hhhhhhhhhh", "iiiiiiiiii", "jjjjjjjjjj"}; "ffffffffff", "gggggggggg", "hhhhhhhhhh", "iiiiiiiiii", "jjjjjjjjjj"};
unsigned int nkeys = 10; unsigned int nkeys = 10;
// Source of keys // 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. //Create minimal perfect hash function using the default (chm) algorithm.
cmph_config_t *config = cmph_config_new(source); cmph_config_t *config = cmph_config_new(source);
@ -110,7 +119,7 @@ int main(int argc, char **argv)
fprintf(stderr, "Id:%u\n", id); fprintf(stderr, "Id:%u\n", id);
//Destroy hash //Destroy hash
cmph_destroy(hash); cmph_destroy(hash);
free(source); cmph_io_vector_adapter_destroy(source);
return 0; return 0;
} }
``` ```
@ -120,7 +129,7 @@ Download [vector_adapter_ex1.c examples/vector_adapter_ex1.c]. This example does
``` ```
#include <cmph.h> #include <cmph.h>
#include <stdio.h> #include <stdio.h>
#include <string.h>
// Create minimal perfect hash function from in-disk keys using BMZ algorithm // Create minimal perfect hash function from in-disk keys using BMZ algorithm
int main(int argc, char **argv) int main(int argc, char **argv)
{ {
@ -146,7 +155,7 @@ int main(int argc, char **argv)
fprintf(stderr, "Id:%u\n", id); fprintf(stderr, "Id:%u\n", id);
//Destroy hash //Destroy hash
cmph_destroy(hash); cmph_destroy(hash);
free(source); cmph_io_nlfile_adapter_destroy(source);
fclose(keys_fd); fclose(keys_fd);
return 0; 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 Minimum perfect hashing tool
-h print this help message -h print this help message
-c c value that determines the number of vertices in the graph -c c value that determines the number of vertices in the graph
-a algorithm - valid values are -a algorithm - valid values are
* bmz * bmz
* bmz8
* chm * chm
* brz
-f hash function (may be used multiple times) - valid values are -f hash function (may be used multiple times) - valid values are
* djb2 * djb2
* fnv * fnv
@ -195,7 +206,11 @@ utility.
-g generation mode -g generation mode
-s random seed -s random seed
-m minimum perfect hash function file -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 keysfile line separated file with keys
``` ```
==Additional Documentation== ==Additional Documentation==