Added iter limit to prevent infinite loop (#25)

This commit is contained in:
Waldir Leoncio 2023-08-09 14:17:54 +02:00
parent b034158e2b
commit 3ab0a73a02

View file

@ -125,7 +125,13 @@ indMix <- function(c, npops, counts = NULL, sumcounts = NULL, max_iter = 100L, d
)
}
iter <- 1L
while (ready != 1) {
iter <- iter + 1L
if (iter > max_iter) {
warning("max_iter reached. Stopping.")
break
}
# FIXME: loop caught in here
muutoksia <- 0