| OLD | NEW |
| 1 /* Modified for use with yasm by Peter Johnson. | 1 /* Modified for use with yasm by Peter Johnson. */ |
| 2 * $Id: perfect.c 1942 2007-09-11 02:11:19Z peter $ | |
| 3 */ | |
| 4 /* | 2 /* |
| 5 ------------------------------------------------------------------------------ | 3 ------------------------------------------------------------------------------ |
| 6 perfect.c: code to generate code for a hash for perfect hashing. | 4 perfect.c: code to generate code for a hash for perfect hashing. |
| 7 (c) Bob Jenkins, September 1996, December 1999 | 5 (c) Bob Jenkins, September 1996, December 1999 |
| 8 You may use this code in any way you wish, and it is free. No warranty. | 6 You may use this code in any way you wish, and it is free. No warranty. |
| 9 I hereby place this in the public domain. | 7 I hereby place this in the public domain. |
| 10 Source is http://burtleburtle.net/bob/c/perfect.c | 8 Source is http://burtleburtle.net/bob/c/perfect.c |
| 11 | 9 |
| 12 This generates a minimal perfect hash function. That means, given a | 10 This generates a minimal perfect hash function. That means, given a |
| 13 set of n keys, this determines a hash function that maps each of | 11 set of n keys, this determines a hash function that maps each of |
| (...skipping 1157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1171 form.hashtype = STRING_HT; | 1169 form.hashtype = STRING_HT; |
| 1172 form.perfect = MINIMAL_HP; | 1170 form.perfect = MINIMAL_HP; |
| 1173 form.speed = SLOW_HS; | 1171 form.speed = SLOW_HS; |
| 1174 | 1172 |
| 1175 /* Generate the [minimal] perfect hash */ | 1173 /* Generate the [minimal] perfect hash */ |
| 1176 driver(&form); | 1174 driver(&form); |
| 1177 | 1175 |
| 1178 return EXIT_SUCCESS; | 1176 return EXIT_SUCCESS; |
| 1179 } | 1177 } |
| 1180 #endif | 1178 #endif |
| OLD | NEW |