Skip to content

Commit 621c28f

Browse files
committed
use comm.stop()
1 parent 31cd546 commit 621c28f

File tree

5 files changed

+5
-5
lines changed

5 files changed

+5
-5
lines changed

R/00_pmclust_reduceK.r

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ pmclust.reduceK <- function(X = NULL, K = 2, MU = NULL,
2929
K <- K - length(i.k)
3030

3131
### Initial global storage.
32-
PARAM.org <- set.global(K = K, RndEM.iter = RndEM.iter)
32+
PARAM.org <- set.global(K = K, RndEM.iter = 0)
3333

3434
### Replacing PARAM.org by previous PARAM.new.
3535
PARAM.org$K <- K

R/dmat_em_base.r

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ m.step.dmat <- function(PARAM){
230230

231231
.pmclustEnv$FAIL.i.k <- i.k # i.k is failed to update.
232232
if(.pmclustEnv$CONTROL$stop.at.fail){
233-
stop(paste("NaN occurs at", i.k))
233+
comm.stop(paste("NaN occurs at", i.k))
234234
}
235235
}
236236
} else{

R/pm_aecm_base.r

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ cm.step.spmd.SIGMA <- function(PARAM){
5858

5959
.pmclustEnv$FAIL.i.k <- i.k # i.k is failed to update.
6060
if(.pmclustEnv$CONTROL$stop.at.fail){
61-
stop(paste("NaN occurs at", i.k))
61+
comm.stop(paste("NaN occurs at", i.k))
6262
}
6363
}
6464
} else{

R/pm_apecma_base.r

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ cm.step.spmd.MU.SIGMA.k <- function(PARAM, i.k){
5555

5656
.pmclustEnv$FAIL.i.k <- i.k # i.k is failed to update.
5757
if(.pmclustEnv$CONTROL$stop.at.fail){
58-
stop(paste("NaN occurs at", i.k))
58+
comm.stop(paste("NaN occurs at", i.k))
5959
}
6060
}
6161
} else{

R/pm_em_base.r

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ m.step.spmd <- function(PARAM){
105105

106106
.pmclustEnv$FAIL.i.k <- i.k # i.k is failed to update.
107107
if(.pmclustEnv$CONTROL$stop.at.fail){
108-
stop(paste("NaN occurs at", i.k))
108+
comm.stop(paste("NaN occurs at", i.k))
109109
}
110110
}
111111
} else{

0 commit comments

Comments
 (0)