* Replacement for map<> using hash tables. */
/*
- * GiNaC Copyright (C) 1999-2003 Johannes Gutenberg University Mainz, Germany
+ * GiNaC Copyright (C) 1999-2008 Johannes Gutenberg University Mainz, Germany
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef __GINAC_HASH_MAP_H__
*
* Differences to map<>:
* - no lower_bound()/upper_bound()
- * - no "insert with a hint" insert(iterator, key_type)
* - no reverse iterators, no rbegin()/rend()
* - no operator<()
* - comparison functor is hardcoded to ex_is_less
// Modifiers
std::pair<iterator, bool> insert(const value_type &x);
+ iterator insert(iterator pos, const value_type &x)
+ {
+ return insert(x).first;
+ }
+
template <class InputIterator>
void insert(InputIterator first, InputIterator last)
{
return !(lhs == rhs);
}
+#if 0
void dump() const
{
std::clog << "num_entries = " << num_entries << std::endl;
std::clog << (it->first == EMPTY ? "free" : (it->first == USED ? "used" : "erased")) << ", " << it->second.first << " -> " << it->second.second << std::endl;
}
}
+#endif
};
/** Return pointer to bucket corresponding to key (or first empty bucket). */