Tools.h++ Class Reference

Table Of Contents
copied into self. Returns the number of elements inserted.
size_type
insert(const_iterator first, const_iterator bound);
For each element in the range beginning with first and bounded by bound, the element is
copied into self. Returns the number of elements inserted.
void
swap(rw_hashmultimap<K,V,Hash,EQ>& other);
Exchanges the contents of self with other including the Hash and EQ objects. This
method does not copy or destroy any of the items exchanged but exchanges the
underlying hash tables.
Special Methods for Multimaps
size_type
count(const key_type& key) const;
Returns the number of pairs in self which have key EQ to their first element.
bool
equal_by_keys(const rw_hashmultimap<K,V,Hash,EQ>& rhs) const;
Returns true if self and rhs have the same size, and if for each distinct key_type in self,
self and rhs have the same number of pairs with first parts that test EQ to that instance.
Note that this method does not compare the V (second) part of the pair of the items, so it
will run slightly faster than operator==().
const_iterator
find(const key_type& key) const;
Returns a const_iterator referencing some pair with key as its first element, if such a pair
is contained in self, else returns end().
iterator
find(const key_type& key);
Returns an iterator referencing some pair with key as its first element, if such a pair is
contained in self, else returns end().
void
resize(size_type sz);
Resizes self's hash table to have sz slots; and re-hashes all self's elements into the new
table. Can be very expensive if self holds many elements.