43cc_hash_max_collision_check_resize_trigger(
float load) :
48 m_resize_needed(false)
54notify_find_search_start()
60notify_find_search_collision()
66notify_find_search_end()
72notify_insert_search_start()
78notify_insert_search_collision()
84notify_insert_search_end()
85{ calc_resize_needed(); }
90notify_erase_search_start()
96notify_erase_search_collision()
102notify_erase_search_end()
108notify_inserted(size_type)
114notify_erased(size_type)
115{ m_resize_needed =
true; }
121{ m_resize_needed =
false; }
126is_resize_needed()
const
127{
return m_resize_needed; }
132is_grow_needed(size_type , size_type )
const
133{
return m_num_col >= m_max_col; }
138notify_resized(size_type new_size)
142#ifdef PB_DS_HT_MAP_RESIZE_TRACE_
144 <<
static_cast<unsigned long>(new_size) <<
std::endl;
148 calc_resize_needed();
158 const double ln_arg = 2 * m_size *
std::log(
double(m_size));
161#ifdef PB_DS_HT_MAP_RESIZE_TRACE_
162 std::cerr <<
"chmccrt::calc_max_num_coll "
163 <<
static_cast<unsigned long>(m_size) <<
" "
164 <<
static_cast<unsigned long>(m_max_col) <<
std::endl;
171notify_externally_resized(size_type new_size)
172{ notify_resized(new_size); }
177swap(PB_DS_CLASS_C_DEC& other)
179 std::swap(m_load, other.m_load);
180 std::swap(m_size, other.m_size);
181 std::swap(m_num_col, other.m_num_col);
182 std::swap(m_max_col, other.m_max_col);
183 std::swap(m_resize_needed, other.m_resize_needed);
191 PB_DS_STATIC_ASSERT(access, external_load_access);
199{ m_resize_needed = m_resize_needed || m_num_col >= m_max_col; }
206 PB_DS_STATIC_ASSERT(access, external_load_access);
209 calc_resize_needed();
complex< _Tp > log(const complex< _Tp > &)
Return complex natural logarithm of z.
complex< _Tp > sqrt(const complex< _Tp > &)
Return complex square root of z.
basic_ostream< _CharT, _Traits > & endl(basic_ostream< _CharT, _Traits > &__os)
Write a newline and flush the stream.
ostream cerr
Linked to standard output.