-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
41 additions
and
64 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#include "fdasrsf/rbfgs.h" | ||
#include <RcppArmadillo.h> | ||
// Correctly setup the build environment | ||
// [[Rcpp::depends(RcppArmadillo)]] | ||
|
||
using namespace arma; | ||
using namespace Rcpp; | ||
using namespace std; | ||
|
||
RcppExport SEXP _fdasrvf_rlbfgs_optim(SEXP q1SEXP, SEXP q2SEXP, SEXP timeSEXP, SEXP maxiterSEXP, SEXP lamSEXP, SEXP penaltySEXP) { | ||
vec q1 = as<vec>(q1SEXP); | ||
vec q2 = as<vec>(q2SEXP); | ||
vec time = as<vec>(timeSEXP); | ||
int maxiter = as<int>(maxiterSEXP); | ||
int len = q1.size(); | ||
double lam = as<double>(lamSEXP); | ||
int penalty = as<int>(penaltySEXP); | ||
vec gam(len); | ||
gam = rlbfgs_optim(q1, q2, time, maxiter, lam, penalty); | ||
return wrap(gam); | ||
} |