Initialize hash set The Michael's hash set is non-expandable container. You should point the average count of items \p nMaxItemCount when you create an object. \p nLoadFactor parameter defines average count of items per bucket and it should be small number between 1 and 10. Remember, since the bucket implementation is an ordered list, searching in the bucket is
| 300 | The ctor defines hash table size as rounding <tt>nMaxItemCount / nLoadFactor</tt> up to nearest power of two. |
| 301 | */ |
| 302 | MichaelHashSet( |
| 303 | size_t nMaxItemCount, ///< estimation of max item count in the hash set |
| 304 | size_t nLoadFactor ///< load factor: estimation of max number of items in the bucket |
| 305 | ) : m_nHashBitmask( michael_set::details::init_hash_bitmask( nMaxItemCount, nLoadFactor )) |
| 306 | , m_Buckets( bucket_table_allocator().allocate( bucket_count())) |
| 307 | { |
| 308 | for ( auto it = m_Buckets, itEnd = m_Buckets + bucket_count(); it != itEnd; ++it ) |
| 309 | construct_bucket<bucket_stat>( it ); |
| 310 | } |
| 311 | |
| 312 | /// Clears hash set and destroys it |
| 313 | ~MichaelHashSet() |
nothing calls this directly
no test coverage detected