mirror of
https://github.com/moparisthebest/wget
synced 2024-07-03 16:38:41 -04:00
[svn] *** empty log message ***
This commit is contained in:
parent
85ff32caeb
commit
21f6620b49
12
src/hash.c
12
src/hash.c
@ -103,12 +103,12 @@ 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.
|
||||||
|
|
||||||
For those not up to CS parlance, it means that all the hash entries
|
In regular language, it means that all the hash entries (pairs of
|
||||||
(pairs of pointers key and value) are stored in a contiguous array.
|
pointers key and value) are stored in a contiguous array. The
|
||||||
The position of each mapping is determined by the hash value of its
|
position of each mapping is determined by the hash value of its key
|
||||||
key and the size of the table: location := hash(key) % size. If
|
and the size of the table: location := hash(key) % size. If two
|
||||||
two different keys end up on the same position (collide), the one
|
different keys end up on the same position (collide), the one that
|
||||||
that came second is placed at the next empty position following the
|
came second is placed at the next empty position following the
|
||||||
occupied place. This collision resolution technique is called
|
occupied place. This collision resolution technique is called
|
||||||
"linear probing".
|
"linear probing".
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user