Skip to content

Commit

Permalink
added return vars
Browse files Browse the repository at this point in the history
  • Loading branch information
chung@molgen.mpg.de committed Jan 20, 2016
1 parent b89b057 commit 36b1b84
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 6 deletions.
2 changes: 1 addition & 1 deletion R/RcppExports.R
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
# Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393

estimate <- function(t_, s_, z_, empty_, mu_, nContig, nExperiment, iter = 0L, maxIter = 10L, seed = 0L) {
invisible(.Call('decon_estimate', PACKAGE = 'decon', t_, s_, z_, empty_, mu_, nContig, nExperiment, iter, maxIter, seed))
.Call('decon_estimate', PACKAGE = 'decon', t_, s_, z_, empty_, mu_, nContig, nExperiment, iter, maxIter, seed)
}

7 changes: 4 additions & 3 deletions src/RcppExports.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,10 @@
using namespace Rcpp;

// estimate
void estimate(Rcpp::List t_, Rcpp::List s_, Rcpp::List z_, Rcpp::List empty_, Rcpp::List mu_, int nContig, int nExperiment, int iter, int maxIter, long seed);
Rcpp::List estimate(Rcpp::List t_, Rcpp::List s_, Rcpp::List z_, Rcpp::List empty_, Rcpp::List mu_, int nContig, int nExperiment, int iter, int maxIter, long seed);
RcppExport SEXP decon_estimate(SEXP t_SEXP, SEXP s_SEXP, SEXP z_SEXP, SEXP empty_SEXP, SEXP mu_SEXP, SEXP nContigSEXP, SEXP nExperimentSEXP, SEXP iterSEXP, SEXP maxIterSEXP, SEXP seedSEXP) {
BEGIN_RCPP
Rcpp::RObject __result;
Rcpp::RNGScope __rngScope;
Rcpp::traits::input_parameter< Rcpp::List >::type t_(t_SEXP);
Rcpp::traits::input_parameter< Rcpp::List >::type s_(s_SEXP);
Expand All @@ -22,7 +23,7 @@ BEGIN_RCPP
Rcpp::traits::input_parameter< int >::type iter(iterSEXP);
Rcpp::traits::input_parameter< int >::type maxIter(maxIterSEXP);
Rcpp::traits::input_parameter< long >::type seed(seedSEXP);
estimate(t_, s_, z_, empty_, mu_, nContig, nExperiment, iter, maxIter, seed);
return R_NilValue;
__result = Rcpp::wrap(estimate(t_, s_, z_, empty_, mu_, nContig, nExperiment, iter, maxIter, seed));
return __result;
END_RCPP
}
8 changes: 6 additions & 2 deletions src/rmn.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ void sampleU(
}

//[[Rcpp::export]]
void estimate(
Rcpp::List estimate(
Rcpp::List t_,
Rcpp::List s_,
Rcpp::List z_,
Expand Down Expand Up @@ -270,7 +270,11 @@ void estimate(
}
std::cout << iter << ": new likelihood: " << lnL << std::endl;
}

return Rcpp::List::create(
Rcpp::Named("z") = z,
Rcpp::Named("empty") = empty,
Rcpp::Named("mu") = mu,
Rcpp::Named("lnL") = lnL);
}


Expand Down

0 comments on commit 36b1b84

Please sign in to comment.