__normal_call bool_type find ( data_type const&_data, list_type &_list ) { if (this->_lptr.empty()) return false; /*------------------------------- evaluate hash value */ size_type _hpos = this->_hash(_data ) % this->_lptr.count(); /*------------------------------- scan list from head */ item_type*_same = this->_lptr[_hpos] ; /*------------------------------- check exact matches */ for( ; _same != nullptr; _same = _same->_next) { if (this->_pred(_same->_data,_data)) { _list.push_tail(_same); } } /*---------------------------------- no matches found */ return ( !_list.empty() ); }
void shrink(_tMap& m, _func f) { yassume(!empty()); auto& val(list_type::back()); if(f) f(val); m.erase(val.first); list_type::pop_back(); }
bool is_empty() { return list_.empty(); }