From ac9b1eeb75da3a55c72d73a35cbe18195c92b881 Mon Sep 17 00:00:00 2001 From: Ulrich Bauer Date: Sat, 13 Jul 2019 18:20:33 +0200 Subject: fixed pop_pivot for Z/2Z coefficients --- ripser.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/ripser.cpp b/ripser.cpp index 51b3d9e..e166080 100644 --- a/ripser.cpp +++ b/ripser.cpp @@ -531,10 +531,8 @@ public: while (!column.empty()) { pivot = column.top(); column.pop(); - if (!column.empty()) { - if (get_index(column.top()) != get_index(pivot)) return pivot; - column.pop(); - } + if (column.empty() || get_index(column.top()) != get_index(pivot)) return pivot; + column.pop(); } pivot = -1; #endif -- cgit v1.2.3