summaryrefslogtreecommitdiff
path: root/ripser.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'ripser.cpp')
-rw-r--r--ripser.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/ripser.cpp b/ripser.cpp
index c99edc0..de2f368 100644
--- a/ripser.cpp
+++ b/ripser.cpp
@@ -55,9 +55,14 @@
#include <unordered_map>
#ifdef USE_GOOGLE_HASHMAP
-#include <sparsehash/sparse_hash_map>
-template <class Key, class T> class hash_map : public google::sparse_hash_map<Key, T> {
+#include <sparsehash/dense_hash_map>
+template <class Key, class T> class hash_map : public google::dense_hash_map<Key, T> {
public:
+ explicit hash_map()
+ : google::dense_hash_map<Key, T>() {
+ this->set_empty_key(-1);
+ }
+
inline void reserve(size_t hint) { this->resize(hint); }
};
#else