A perfect hash function has many of the same applications as other hash functions, but with the advantage that no collision resolution has to be implemented.
一个完美散列函数的应用与其他哈希函数的应用基本一致,但不需要任何冲突解决方案。
A minimal perfect hash function is achieved when the table size is the same as the number of keywords supplied. This case is even rarer.
当表格大小与提供的关键字数量相同时,实现最小的完美散列函数。 这种情况更为罕见。
A perfect hash function is a one-to-one mapping between keys and hash values, i.e. no is possible if all keys are known beforehand. For example, a compiler/interpreter search for reserved keywords. However, such cases are rare.
If you are interested, you can explore GNU gperf, a freely available perfect hash function generator written in C++ that automatically constructs perfect functions (a C++ program) from a user supplied list of keywords.
When this reached, Then we call this hash functionMinimal perfect hash function.
当这种情况达成,那么我们就称这个哈希函数为最小完美哈希函数。
Conteúdo potencialmente sensível ou impróprio
Os exemplos servem apenas como ajuda na tradução da palavra ou da expressão procurada. Eles não são selecionados ou validados por nós e podem conter linguagem inapropriada. Pedimos que reporte exemplos que devem ser modificados ou que não devem ser exibidos. As traduções potencialmente sensivéis, impróprias ou coloquiais geralmente são marcadas em vermelho ou em laranja.