Skip to content

Commit

Permalink
Added MADMMplasso.h (#17)
Browse files Browse the repository at this point in the history
Because `admm_MADMMplasso_cpp()` is a subfunction of `hh_nlambda_loop_cpp()`.
  • Loading branch information
wleoncio committed Jan 26, 2024
1 parent dcfb2a4 commit 08918bd
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 1 deletion.
30 changes: 30 additions & 0 deletions src/MADMMplasso.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
#ifndef MISC_H
#define MISC_H

#include <RcppArmadillo.h>
Rcpp::List admm_MADMMplasso_cpp(
const arma::vec beta0,
const arma::mat theta0,
arma::mat beta,
arma::mat beta_hat,
arma::cube theta,
const double rho1,
const arma::mat X,
const arma::mat Z,
const int max_it,
const arma::mat W_hat,
const arma::mat XtY,
const arma::mat y,
const int N,
const double e_abs,
const double e_rel,
const double alpha,
const arma::vec lambda,
const double alph,
const Rcpp::List svd_w,
const Rcpp::List tree,
const Rcpp::List invmat,
const arma::vec gg,
const bool my_print = true
);
#endif
3 changes: 2 additions & 1 deletion src/hh_nlambda_loop_cpp.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#include <RcppArmadillo.h>
#include "MADMMplasso.h"

// [[Rcpp::depends(RcppArmadillo)]]
Rcpp::List hh_nlambda_loop_cpp(
arma::mat lam,
Expand Down

0 comments on commit 08918bd

Please sign in to comment.