summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Bauer <mail@ulrich-bauer.org>2019-05-23 15:01:48 +0200
committerUlrich Bauer <mail@ulrich-bauer.org>2019-05-23 15:01:48 +0200
commit06d6cef387959d316907ae34125315f35494cf63 (patch)
treea95ff5d3a7c89884b31d94ad676746bf7afd098a
parent9835e62798b7ee401030e9d242bb4ccbdd2705d4 (diff)
use google dense hash
-rw-r--r--ripser.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/ripser.cpp b/ripser.cpp
index 51ba5d5..68ce5a5 100644
--- a/ripser.cpp
+++ b/ripser.cpp
@@ -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) {