Tools.h++ Class Reference

Table Of Contents
insert(const_iterator first, const_iterator bound);
For each element in the range beginning with first and bounded by bound, if there is no
item in self EQ to that element, the element is copied into self, or if there is such an
element, it is skipped. Returns the number of elements inserted.
void
swap(rw_hashset<T,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 Sets
size_type
count(const key_type& key) const;
Returns 1 if self contains key, else 0.
const_iterator
find(const key_type& key) const;
Returns a const_iterator referencing key, if it is contained in self, else returns end().
iterator
find(const key_type& key);
Returns an iterator referencing key, if it 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.