diff options
author | Ulrich Bauer <mail@ulrich-bauer.org> | 2019-07-13 18:20:33 +0200 |
---|---|---|
committer | Ulrich Bauer <mail@ulrich-bauer.org> | 2019-07-13 18:20:33 +0200 |
commit | ac9b1eeb75da3a55c72d73a35cbe18195c92b881 (patch) | |
tree | 9732420ea80e07e417baf0c813852c0364e38969 | |
parent | 30a1d9fd63efbe89f2d2276109d8b95b966501fa (diff) |
fixed pop_pivot for Z/2Z coefficients
-rw-r--r-- | ripser.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
@@ -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 |