1
0
mirror of https://git.savannah.gnu.org/git/gperf.git synced 2025-12-02 21:19:24 +00:00

Optimized choice during collision resolution.

This commit is contained in:
Bruno Haible
2003-03-14 11:01:01 +00:00
parent 19c69d8e5a
commit 7a8b43182a
5 changed files with 136 additions and 13 deletions

View File

@@ -90,8 +90,15 @@ private:
and stores it in keyword->_hash_value. */
int compute_hash (KeywordExt *keyword) const;
/* Computes the frequency of occurrence of a character among the keywords
up to the given keyword. */
unsigned int compute_occurrence (unsigned int c, KeywordExt *curr) const;
/* Sorts the given set in increasing frequency of _occurrences[]. */
void sort_by_occurrence (unsigned int *set, int len) const;
void sort_by_occurrence (unsigned int *set, unsigned int len) const;
/* Sorts the given set in increasing frequency of occurrences among the
keywords up to the given keyword. */
void sort_by_occurrence (unsigned int *set, unsigned int len, KeywordExt *curr) const;
bool has_collisions (KeywordExt *curr);