mirror of
https://github.com/moparisthebest/wget
synced 2024-07-03 16:38:41 -04:00
[svn] Trivial doc fix.
This commit is contained in:
parent
4bbe443be3
commit
36b266f894
15
src/hash.c
15
src/hash.c
@ -106,14 +106,13 @@ so, delete this exception statement from your version. */
|
|||||||
The hash table is implemented as an open-addressed table with
|
The hash table is implemented as an open-addressed table with
|
||||||
linear probing collision resolution.
|
linear probing collision resolution.
|
||||||
|
|
||||||
In regular language, it means that all the hash entries (pairs of
|
The above means that all the hash entries (pairs of pointers, key
|
||||||
pointers key and value) are stored in a contiguous array. The
|
and value) are stored in a contiguous array. The position of each
|
||||||
position of each mapping is determined by the hash value of its key
|
mapping is determined by the hash value of its key and the size of
|
||||||
and the size of the table: location := hash(key) % size. If two
|
the table: location := hash(key) % size. If two different keys end
|
||||||
different keys end up on the same position (collide), the one that
|
up on the same position (collide), the one that came second is
|
||||||
came second is placed at the next empty position following the
|
placed at the next empty position following the occupied place.
|
||||||
occupied place. This collision resolution technique is called
|
This collision resolution technique is called "linear probing".
|
||||||
"linear probing".
|
|
||||||
|
|
||||||
There are more advanced collision resolution methods (quadratic
|
There are more advanced collision resolution methods (quadratic
|
||||||
probing, double hashing), but we don't use them because they incur
|
probing, double hashing), but we don't use them because they incur
|
||||||
|
Loading…
Reference in New Issue
Block a user