Lines Matching defs:element
177 // If an element inbetween doesn't rehash to the range from the current empty slot to the
181 // element to its actual location/index.
191 // If the next element is empty, we are done. Make sure to clear the current empty index.
196 // Otherwise try to see if the next element can fill the current empty index.
227 // Find an element, returns end() if not found.
232 Iterator Find(const K& element) {
233 return FindWithHash(element, hashfn_(element));
236 Iterator FindWithHash(const K& element, size_t hash) {
237 DCHECK_EQ(hashfn_(element), hash);
244 if (pred_(slot, element)) {
250 // Insert an element, allows duplicates.
251 void Insert(const T& element) {
252 InsertWithHash(element, hashfn_(element));
254 void InsertWithHash(const T& element, size_t hash) {
255 DCHECK_EQ(hash, hashfn_(element));
261 data_[index] = element;
275 const T& element = ElementForIndex(i);
276 if (!emptyfn_.IsEmpty(element)) {
277 size_t ideal_location = IndexForHash(hashfn_(element));
295 T& element = data_[i];
296 if (!emptyfn_.IsEmpty(element)) {
299 std::swap(temp, element);
305 std::swap(temp, element);
376 T& element = old_data[i];
377 if (!emptyfn_.IsEmpty(element)) {
378 data_[FirstAvailableSlot(IndexForHash(hashfn_(element)))] = std::move(element);
380 allocfn_.destroy(allocfn_.address(element));