diff options
author | Ulrich Bauer <mail@ulrich-bauer.org> | 2019-05-23 15:01:48 +0200 |
---|---|---|
committer | Ulrich Bauer <mail@ulrich-bauer.org> | 2019-05-23 15:01:48 +0200 |
commit | 06d6cef387959d316907ae34125315f35494cf63 (patch) | |
tree | a95ff5d3a7c89884b31d94ad676746bf7afd098a | |
parent | 9835e62798b7ee401030e9d242bb4ccbdd2705d4 (diff) |
use google dense hash
-rw-r--r-- | ripser.cpp | 9 |
1 files changed, 3 insertions, 6 deletions
@@ -58,11 +58,8 @@ #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); - } - + explicit hash_map() : google::dense_hash_map<Key, T>() { this->set_empty_key(-1); } + inline void reserve(size_t hint) { this->resize(hint); } }; #else @@ -587,7 +584,7 @@ public: #if defined ASSEMBLE_REDUCTION_MATRIX || defined USE_COEFFICIENTS reduction_matrix.push_back(diameter_entry_t(column_to_reduce, 1)); #endif - + bool might_be_apparent_pair = (index_column_to_reduce == index_column_to_add); while (true) { |