Skip to content

Commit

Permalink
print also in case of negative return code
Browse files Browse the repository at this point in the history
  • Loading branch information
helske committed Dec 27, 2024
1 parent 77f98a1 commit 40310dc
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
4 changes: 2 additions & 2 deletions src/fanhmm_EM.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ void fanhmm_sc::mstep_A(const double ftol_abs, const double ftol_rel,
return_code = 7;
}
}
if (print_level > 2 && return_code > 0) {
if (print_level > 2) {
Rcpp::Rcout<<"M-step of transition probabilities of state "<<s + 1<<
" ended with return code "<<return_code<<" after "<<mstep_iter + 1<<
" iterations."<<std::endl;
Expand Down Expand Up @@ -265,7 +265,7 @@ void fanhmm_sc::mstep_B(const double ftol_abs, const double ftol_rel,
return_code = 7;
}
}
if (print_level > 2 && return_code > 0) {
if (print_level > 2) {
Rcpp::Rcout<<"M-step of emission probabilities of state "<<s + 1<<
" ended with return code "<<return_code<<" after "<<mstep_iter + 1<<
" iterations."<<std::endl;
Expand Down
10 changes: 5 additions & 5 deletions src/mnhmm_EM.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ void mnhmm_base::mstep_omega(const double xtol_abs, const double ftol_abs,
return_code = 7;
}
}
if (print_level > 2 && return_code > 0) {
if (print_level > 2) {
Rcpp::Rcout<<"M-step of cluster probabilities ended with return code "<<
return_code<<" after "<<mstep_iter + 1<<" iterations."<<std::endl;
}
Expand Down Expand Up @@ -167,7 +167,7 @@ void mnhmm_base::mstep_pi(const double xtol_abs, const double ftol_abs,
return_code = 7;
}
}
if (print_level > 2 && return_code > 0) {
if (print_level > 2) {
Rcpp::Rcout<<"M-step of initial probabilities ended with return code "<<
return_code<<" after "<<mstep_iter + 1<<" iterations."<<std::endl;
}
Expand Down Expand Up @@ -279,7 +279,7 @@ void mnhmm_base::mstep_A(const double ftol_abs, const double ftol_rel,
return_code = 7;
}
}
if (print_level > 2 && return_code > 0) {
if (print_level > 2) {
Rcpp::Rcout<<"M-step of transition probabilities of state "<<s + 1<<
" ended with return code "<<return_code<<" after "<<mstep_iter + 1<<
" iterations."<<std::endl;
Expand Down Expand Up @@ -399,7 +399,7 @@ void mnhmm_sc::mstep_B(const double ftol_abs, const double ftol_rel,
return_code = 7;
}
}
if (print_level > 2 && return_code > 0) {
if (print_level > 2) {
Rcpp::Rcout<<"M-step of emission probabilities of state "<<s + 1<<
" ended with return code "<<return_code<<" after "<<mstep_iter + 1<<
" iterations."<<std::endl;
Expand Down Expand Up @@ -525,7 +525,7 @@ void mnhmm_mc::mstep_B(const double ftol_abs, const double ftol_rel,
return_code = 7;
}
}
if (print_level > 2 && return_code > 0) {
if (print_level > 2) {
Rcpp::Rcout<<"M-step of emission probabilities of state "<<s + 1<<
" and channel "<<c<<" ended with return code "<<
return_code<<" after "<<mstep_iter + 1<<
Expand Down
8 changes: 4 additions & 4 deletions src/nhmm_EM.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ void nhmm_base::mstep_pi(const double xtol_abs, const double ftol_abs,
return_code = 7;
}
}
if (print_level > 2 && return_code > 0) {
if (print_level > 2) {
Rcpp::Rcout<<"M-step of initial probabilities ended with return code "<<
return_code<<" after "<<mstep_iter + 1<<" iterations."<<std::endl;
}
Expand Down Expand Up @@ -183,7 +183,7 @@ void nhmm_base::mstep_A(const double ftol_abs, const double ftol_rel,
return_code = 7;
}
}
if (print_level > 2 && return_code > 0) {
if (print_level > 2) {
Rcpp::Rcout<<"M-step of transition probabilities of state "<<s + 1<<
" ended with return code "<<return_code<<" after "<<mstep_iter + 1<<
" iterations."<<std::endl;
Expand Down Expand Up @@ -294,7 +294,7 @@ void nhmm_sc::mstep_B(const double ftol_abs, const double ftol_rel,
return_code = 7;
}
}
if (print_level > 2 && return_code > 0) {
if (print_level > 2) {
Rcpp::Rcout<<"M-step of emission probabilities of state "<<s + 1<<
" ended with return code "<<return_code<<" after "<<mstep_iter + 1<<
" iterations."<<std::endl;
Expand Down Expand Up @@ -411,7 +411,7 @@ void nhmm_mc::mstep_B(const double ftol_abs, const double ftol_rel,
return_code = 7;
}
}
if (print_level > 2 && return_code > 0) {
if (print_level > 2) {
Rcpp::Rcout<<"M-step of emission probabilities of state "<<s + 1<<
" and channel "<<c<<" ended with return code "<<return_code<<
" after "<<mstep_iter + 1<<" iterations."<<std::endl;
Expand Down

0 comments on commit 40310dc

Please sign in to comment.