Skip to content

Commit

Permalink
Removed duplicated if case (#17)
Browse files Browse the repository at this point in the history
  • Loading branch information
wleoncio committed Jan 26, 2024
1 parent 1ebe86d commit b84e55a
Showing 1 changed file with 4 additions and 10 deletions.
14 changes: 4 additions & 10 deletions src/hh_nlambda_loop_cpp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,23 +61,17 @@ Rcpp::List hh_nlambda_loop_cpp(
// theta0 <- my_values$theta0 ### iteration
// beta_hat <- my_values$beta_hat
// y_hat <- my_values$y_hat
}
if (parallel && pal == 0) {
} else if (parallel && pal == 0) {
// This is the default case.
// beta <- my_values[hh, ]$beta
// theta <- my_values[hh, ]$theta
// my_obj[[hh]] <- list(my_values[hh, ]$obj)
// beta0 <- my_values[hh, ]$beta0
// theta0 <- my_values[hh, ]$theta0 ### iteration
// beta_hat <- my_values[hh, ]$beta_hat
// y_hat <- my_values[hh, ]$y_hat
} else if (parallel && pal == 0) {
// beta <- my_values[[hh]]$beta
// theta <- my_values[[hh]]$theta
// my_obj[[hh]] <- list(my_values[[hh]]$obj)
// beta0 <- my_values[[hh]]$beta0
// theta0 <- my_values[[hh]]$theta0 ### iteration
// beta_hat <- my_values[[hh]]$beta_hat
// y_hat <- my_values[[hh]]$y_hat
} else {
Rcpp::stop("Invalid combination of parallel and pal.");
}

// beta1 <- as(beta * (abs(beta) > tol), "sparseMatrix")
Expand Down

0 comments on commit b84e55a

Please sign in to comment.