Skip to content

Commit

Permalink
force use dgCMatrix in mincut_c test
Browse files Browse the repository at this point in the history
  • Loading branch information
hclimente committed Sep 26, 2022
1 parent 6f83da6 commit cb778c6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions src/RcppExports.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@

using namespace Rcpp;

#ifdef RCPP_USE_GLOBAL_ROSTREAM
Rcpp::Rostream<true>& Rcpp::Rcout = Rcpp::Rcpp_cout_get();
Rcpp::Rostream<false>& Rcpp::Rcerr = Rcpp::Rcpp_cerr_get();
#endif

// maxflow
LogicalVector maxflow(Eigen::SparseMatrix<double,Eigen::ColMajor> const& A, Eigen::VectorXd const& As, Eigen::VectorXd const& At);
static SEXP _martini_maxflow_try(SEXP ASEXP, SEXP AsSEXP, SEXP AtSEXP) {
Expand Down
2 changes: 1 addition & 1 deletion tests/testthat/test_mincut_c.R
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ test_that("we recover causal SNPs", {
W <- cbind(rbind(0, W[-1,-1]),0) + rbind(cbind(0,W[-1,-1]),0)
W[1:pCausal, 1:pCausal] <- 1
diag(W) <- 0
W <- as(W, "sparseMatrix")
W <- as(W, Class = "dgCMatrix")

selected <- mincut_c(c, 1, 2, W)

Expand Down

0 comments on commit cb778c6

Please sign in to comment.