Skip to content

Commit

Permalink
Rebuild binding hooks per Rcpp 0.12.15 (e.g. /src/init.c not required)
Browse files Browse the repository at this point in the history
  • Loading branch information
coatless committed Feb 4, 2018
1 parent 7cea827 commit 372c5dd
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 44 deletions.
12 changes: 6 additions & 6 deletions R/RcppExports.R
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#' @author Steven Andrew Culpepper
#' @export
rmultinomial <- function(ps) {
.Call('dina_rmultinomial', PACKAGE = 'dina', ps)
.Call(`_dina_rmultinomial`, ps)
}

#' Generate Dirichlet Random Variable
Expand All @@ -20,7 +20,7 @@ rmultinomial <- function(ps) {
#' @author Steven Andrew Culpepper
#' @export
rDirichlet <- function(deltas) {
.Call('dina_rDirichlet', PACKAGE = 'dina', deltas)
.Call(`_dina_rDirichlet`, deltas)
}

#' Simulation Responses from the DINA model
Expand Down Expand Up @@ -99,7 +99,7 @@ rDirichlet <- function(deltas) {
#' rownames(PIoutput) = apply(As,1,paste0,collapse='')
#' print(PIoutput,digits=3)
DINAsim <- function(alphas, Q, ss, gs) {
.Call('dina_DINAsim', PACKAGE = 'dina', alphas, Q, ss, gs)
.Call(`_dina_DINAsim`, alphas, Q, ss, gs)
}

#' Update attributes and latent class probabilities
Expand All @@ -118,7 +118,7 @@ DINAsim <- function(alphas, Q, ss, gs) {
#' @author Steven Andrew Culpepper
#' @export
update_alpha <- function(Amat, Q, ss, gs, Y, PIs, ALPHAS, delta0) {
.Call('dina_update_alpha', PACKAGE = 'dina', Amat, Q, ss, gs, Y, PIs, ALPHAS, delta0)
.Call(`_dina_update_alpha`, Amat, Q, ss, gs, Y, PIs, ALPHAS, delta0)
}

#' Update item parameters
Expand All @@ -136,7 +136,7 @@ update_alpha <- function(Amat, Q, ss, gs, Y, PIs, ALPHAS, delta0) {
#' @author Steven Andrew Culpepper
#' @export
update_sg <- function(Y, Q, ALPHAS, ss_old, as0, bs0, ag0, bg0) {
.Call('dina_update_sg', PACKAGE = 'dina', Y, Q, ALPHAS, ss_old, as0, bs0, ag0, bg0)
.Call(`_dina_update_sg`, Y, Q, ALPHAS, ss_old, as0, bs0, ag0, bg0)
}

#' Generate Posterior Distribution with Gibbs sampler
Expand Down Expand Up @@ -269,6 +269,6 @@ update_sg <- function(Y, Q, ALPHAS, ss_old, as0, bs0, ag0, bg0) {
#' print(PIoutput,digits=3)
#' }
DINA_Gibbs <- function(Y, Amat, Q, chain_length = 10000L) {
.Call('dina_DINA_Gibbs', PACKAGE = 'dina', Y, Amat, Q, chain_length)
.Call(`_dina_DINA_Gibbs`, Y, Amat, Q, chain_length)
}

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

// rmultinomial
double rmultinomial(const arma::vec& ps);
RcppExport SEXP dina_rmultinomial(SEXP psSEXP) {
RcppExport SEXP _dina_rmultinomial(SEXP psSEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::RNGScope rcpp_rngScope_gen;
Expand All @@ -19,7 +19,7 @@ END_RCPP
}
// rDirichlet
arma::vec rDirichlet(const arma::vec& deltas);
RcppExport SEXP dina_rDirichlet(SEXP deltasSEXP) {
RcppExport SEXP _dina_rDirichlet(SEXP deltasSEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::RNGScope rcpp_rngScope_gen;
Expand All @@ -30,7 +30,7 @@ END_RCPP
}
// DINAsim
Rcpp::List DINAsim(const arma::mat& alphas, const arma::mat& Q, const arma::vec& ss, const arma::vec& gs);
RcppExport SEXP dina_DINAsim(SEXP alphasSEXP, SEXP QSEXP, SEXP ssSEXP, SEXP gsSEXP) {
RcppExport SEXP _dina_DINAsim(SEXP alphasSEXP, SEXP QSEXP, SEXP ssSEXP, SEXP gsSEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::RNGScope rcpp_rngScope_gen;
Expand All @@ -44,7 +44,7 @@ END_RCPP
}
// update_alpha
Rcpp::List update_alpha(const arma::mat& Amat, const arma::mat& Q, const arma::vec& ss, const arma::vec& gs, const arma::mat& Y, const arma::vec& PIs, arma::mat& ALPHAS, const arma::vec& delta0);
RcppExport SEXP dina_update_alpha(SEXP AmatSEXP, SEXP QSEXP, SEXP ssSEXP, SEXP gsSEXP, SEXP YSEXP, SEXP PIsSEXP, SEXP ALPHASSEXP, SEXP delta0SEXP) {
RcppExport SEXP _dina_update_alpha(SEXP AmatSEXP, SEXP QSEXP, SEXP ssSEXP, SEXP gsSEXP, SEXP YSEXP, SEXP PIsSEXP, SEXP ALPHASSEXP, SEXP delta0SEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::RNGScope rcpp_rngScope_gen;
Expand All @@ -62,7 +62,7 @@ END_RCPP
}
// update_sg
Rcpp::List update_sg(const arma::mat& Y, const arma::mat& Q, const arma::mat& ALPHAS, const arma::vec& ss_old, double as0, double bs0, double ag0, double bg0);
RcppExport SEXP dina_update_sg(SEXP YSEXP, SEXP QSEXP, SEXP ALPHASSEXP, SEXP ss_oldSEXP, SEXP as0SEXP, SEXP bs0SEXP, SEXP ag0SEXP, SEXP bg0SEXP) {
RcppExport SEXP _dina_update_sg(SEXP YSEXP, SEXP QSEXP, SEXP ALPHASSEXP, SEXP ss_oldSEXP, SEXP as0SEXP, SEXP bs0SEXP, SEXP ag0SEXP, SEXP bg0SEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::RNGScope rcpp_rngScope_gen;
Expand All @@ -80,7 +80,7 @@ END_RCPP
}
// DINA_Gibbs
Rcpp::List DINA_Gibbs(const arma::mat& Y, const arma::mat& Amat, const arma::mat& Q, unsigned int chain_length);
RcppExport SEXP dina_DINA_Gibbs(SEXP YSEXP, SEXP AmatSEXP, SEXP QSEXP, SEXP chain_lengthSEXP) {
RcppExport SEXP _dina_DINA_Gibbs(SEXP YSEXP, SEXP AmatSEXP, SEXP QSEXP, SEXP chain_lengthSEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::RNGScope rcpp_rngScope_gen;
Expand All @@ -92,3 +92,18 @@ BEGIN_RCPP
return rcpp_result_gen;
END_RCPP
}

static const R_CallMethodDef CallEntries[] = {
{"_dina_rmultinomial", (DL_FUNC) &_dina_rmultinomial, 1},
{"_dina_rDirichlet", (DL_FUNC) &_dina_rDirichlet, 1},
{"_dina_DINAsim", (DL_FUNC) &_dina_DINAsim, 4},
{"_dina_update_alpha", (DL_FUNC) &_dina_update_alpha, 8},
{"_dina_update_sg", (DL_FUNC) &_dina_update_sg, 8},
{"_dina_DINA_Gibbs", (DL_FUNC) &_dina_DINA_Gibbs, 4},
{NULL, NULL, 0}
};

RcppExport void R_init_dina(DllInfo *dll) {
R_registerRoutines(dll, NULL, CallEntries, NULL, NULL);
R_useDynamicSymbols(dll, FALSE);
}
32 changes: 0 additions & 32 deletions src/init.c

This file was deleted.

0 comments on commit 372c5dd

Please sign in to comment.