Some fixes for inspection report, Run Date: 15:00:47 UTC, Friday 27 June 2008

[SVN r46787]
This commit is contained in:
Ion Gaztañaga
2008-06-27 18:20:47 +00:00
parent 1f6958076f
commit 04883b48c3
2 changed files with 7 additions and 39 deletions

View File

@@ -1,9 +1,14 @@
<!--
Copyright 2005-2008 Ion Gaztanaga
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
-->
<html>
<head>
<meta http-equiv="refresh" content="0; URL=../../doc/html/intrusive.html">
</head>
<body>
Automatic redirection failed, please go to
<a href="../../doc/html/intrusive">../../doc/html/intrusive</a>
<a href="../../doc/html/intrusive.html">../../doc/html/intrusive.html</a>
</body>
</html>

View File

@@ -1,37 +0,0 @@
Implement incremental hashing:
bucket_len is power of two
cur_idx is always at least, half of bucket_len
find bucket from value:
size_type bucket_num = hash(val) &(bucket_len - 1);
if (bucket_num >= cur_idx)
bucket_num -= bucket_len/2;
incremental_rehash:
iterator _Plist, _Where;
if (load_factor > LoadFactorLimit)
{ // too dense, need to grow hash table
if (cur_idx >= (bucket_len - 1))
{ // table full, request doubling
return false;
}
else if (cur_idx >= bucket_len)
bucket_len*=2;
size_type bucket_num = cur_idx - bucket_len/2;
// rehash elements from bucket_num
++cur_idx;
}
insert from value:
size_type bucket_num = hash(val) & (bucket_len - 1);
if (bucket_num >= cur_idx)
bucket_num -= bucket_len/2;
insert in bucket
rehash: