Added iter limit to prevent infinite loop (#25)
This commit is contained in:
parent
b034158e2b
commit
3ab0a73a02
1 changed files with 6 additions and 0 deletions
|
|
@ -125,7 +125,13 @@ indMix <- function(c, npops, counts = NULL, sumcounts = NULL, max_iter = 100L, d
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
iter <- 1L
|
||||||
while (ready != 1) {
|
while (ready != 1) {
|
||||||
|
iter <- iter + 1L
|
||||||
|
if (iter > max_iter) {
|
||||||
|
warning("max_iter reached. Stopping.")
|
||||||
|
break
|
||||||
|
}
|
||||||
# FIXME: loop caught in here
|
# FIXME: loop caught in here
|
||||||
muutoksia <- 0
|
muutoksia <- 0
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue