Skip to content

Commit

Permalink
Compilation error fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Paul-Haimerl committed Jun 27, 2024
1 parent 2d1b34e commit 4ab2136
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 9 deletions.
4 changes: 2 additions & 2 deletions R/RcppExports.R
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Generated by using Rcpp::compileAttributes() -> do not edit by hand
# Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393

BTtestRoutine <- function(X, r_max, alpha, BT1) {
.Call(`_BTtest_BTtestRoutine`, X, r_max, alpha, BT1)
BTtestRoutine <- function(X, r_max, alpha, BT1, R) {
.Call(`_BTtest_BTtestRoutine`, X, r_max, alpha, BT1, R)
}

BaiIPCRoutine <- function(X, r_max) {
Expand Down
6 changes: 4 additions & 2 deletions man/BTtest.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/BTtest-package.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ arma::mat standEigVals(const arma::mat &X, int T, const int &N, const double &de
}


float randomTest(const arma::mat &Phi, const int &indx, const int &p, unsigned int &R)
float randomTest(const arma::mat &Phi, const int &indx, const int &p, unsigned int R)
{
float phi = Phi.col(indx)(p);
// Set the thresholds according to the zeroes of the Hermite polynomial
Expand Down
9 changes: 5 additions & 4 deletions src/RcppExports.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,17 @@ Rcpp::Rostream<false>& Rcpp::Rcerr = Rcpp::Rcpp_cerr_get();
#endif

// BTtestRoutine
NumericVector BTtestRoutine(const arma::mat& X, const int& r_max, const double& alpha, const bool& BT1);
RcppExport SEXP _BTtest_BTtestRoutine(SEXP XSEXP, SEXP r_maxSEXP, SEXP alphaSEXP, SEXP BT1SEXP) {
NumericVector BTtestRoutine(const arma::mat& X, const int& r_max, const double& alpha, const bool& BT1, const unsigned int& R);
RcppExport SEXP _BTtest_BTtestRoutine(SEXP XSEXP, SEXP r_maxSEXP, SEXP alphaSEXP, SEXP BT1SEXP, SEXP RSEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::RNGScope rcpp_rngScope_gen;
Rcpp::traits::input_parameter< const arma::mat& >::type X(XSEXP);
Rcpp::traits::input_parameter< const int& >::type r_max(r_maxSEXP);
Rcpp::traits::input_parameter< const double& >::type alpha(alphaSEXP);
Rcpp::traits::input_parameter< const bool& >::type BT1(BT1SEXP);
rcpp_result_gen = Rcpp::wrap(BTtestRoutine(X, r_max, alpha, BT1));
Rcpp::traits::input_parameter< const unsigned int& >::type R(RSEXP);
rcpp_result_gen = Rcpp::wrap(BTtestRoutine(X, r_max, alpha, BT1, R));
return rcpp_result_gen;
END_RCPP
}
Expand All @@ -39,7 +40,7 @@ END_RCPP
}

static const R_CallMethodDef CallEntries[] = {
{"_BTtest_BTtestRoutine", (DL_FUNC) &_BTtest_BTtestRoutine, 4},
{"_BTtest_BTtestRoutine", (DL_FUNC) &_BTtest_BTtestRoutine, 5},
{"_BTtest_BaiIPCRoutine", (DL_FUNC) &_BTtest_BaiIPCRoutine, 2},
{NULL, NULL, 0}
};
Expand Down
2 changes: 2 additions & 0 deletions tests/testthat/test-BTtest.R
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ test_that("BT_test_result", {
names(result_num) <- NULL
expect_identical(result_num, c(1, 1, 2))
expect_identical(names(result), paste0("r_", 1:3, "_hat"))
# Selecting a specific R
expect_no_error(BTtest(X = X, r_max = 10, alpha = 0.05, BT1 = TRUE, R = 100))
})


Expand Down

0 comments on commit 4ab2136

Please sign in to comment.