From ce9c4a6f57e5d25b1884445e9dd040322aa30bea Mon Sep 17 00:00:00 2001 From: bbayukari <17bbayukari@gmail.com> Date: Mon, 27 May 2024 23:55:18 +0800 Subject: [PATCH] fix: bug when support set is like range(k) --- src/Algorithm.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Algorithm.h b/src/Algorithm.h index 66057cf4..1d73109c 100644 --- a/src/Algorithm.h +++ b/src/Algorithm.h @@ -438,7 +438,7 @@ class Algorithm { } // If A_U not change, U will not change and we can stop. - if (A_U.size() == 0 || A_U.maxCoeff() == T0 - 1) break; + if (this->U_size < N && (A_U.size() == 0 || A_U.maxCoeff() == T0 - 1)) break; // Update & Restore beta, A from U slice_restore(beta_U, U_ind, beta);