From 06d6cef387959d316907ae34125315f35494cf63 Mon Sep 17 00:00:00 2001 From: Ulrich Bauer Date: Thu, 23 May 2019 15:01:48 +0200 Subject: use google dense hash --- ripser.cpp | 9 +++------ 1 file 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 template class hash_map : public google::dense_hash_map { public: - explicit hash_map() - : google::dense_hash_map() { - this->set_empty_key(-1); - } - + explicit hash_map() : google::dense_hash_map() { 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) { -- cgit v1.2.3