Tools.h++ Class Reference

Table Of Contents
Returns the number of slots in the hash table that self uses.
bool
empty() const;
Returns true if self is empty.
float
fill_ratio() const;
Returns the result of calculating size()/capacity().
size_type
size() const;
Returns the number of pairs currently held in self.
Mutators
void
clear();
A synonym for erase(begin(),end());
size_type
erase(const key_type& key);
If there is a pair in self for which the first part is EQ to key, that pair is removed, and 1 is
returned. Otherwise, 0 is returned.
iterator
erase(iterator iter);
Removes the element referenced by iter and returns an iterator referencing the "next"
element. If iter does not reference an item in self, the result is undefined.
iterator
erase(iterator first, iterator bound);
Removes each element in the range which begins with first and is bound by bound.
Returns an iterator referencing bound. If first does not reference an item in self (and if
first and bound are not equal), the effect is undefined.
pair<iterator,bool>
insert(const value_type& val);
If there is no pair in self with first part EQ to the first part of val then inserts val,
returning a pair with an iterator referencing the new element and true. Otherwise, returns
a pair with an iterator referencing the matching value_type and false.
size_type
insert(iterator ignore, const value_type& val);
If there is no pair in self with first part EQ to the first part of val then inserts val,