// Generated by using Rcpp::compileAttributes() -> do not edit by hand
// Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393

#include <RcppArmadillo.h>
#include <Rcpp.h>

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

// rowVars
Rcpp::NumericVector rowVars(Rcpp::NumericMatrix mat_in);
RcppExport SEXP _BAMBI_rowVars(SEXP mat_inSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< Rcpp::NumericMatrix >::type mat_in(mat_inSEXP);
    rcpp_result_gen = Rcpp::wrap(rowVars(mat_in));
    return rcpp_result_gen;
END_RCPP
}
// par_mat_permute
arma::cube par_mat_permute(arma::cube par_mat, arma::umat perm_lab);
RcppExport SEXP _BAMBI_par_mat_permute(SEXP par_matSEXP, SEXP perm_labSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< arma::cube >::type par_mat(par_matSEXP);
    Rcpp::traits::input_parameter< arma::umat >::type perm_lab(perm_labSEXP);
    rcpp_result_gen = Rcpp::wrap(par_mat_permute(par_mat, perm_lab));
    return rcpp_result_gen;
END_RCPP
}
// cID
Rcpp::NumericVector cID(Rcpp::NumericMatrix probs, int ncomp, Rcpp::NumericVector Uv);
RcppExport SEXP _BAMBI_cID(SEXP probsSEXP, SEXP ncompSEXP, SEXP UvSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< Rcpp::NumericMatrix >::type probs(probsSEXP);
    Rcpp::traits::input_parameter< int >::type ncomp(ncompSEXP);
    Rcpp::traits::input_parameter< Rcpp::NumericVector >::type Uv(UvSEXP);
    rcpp_result_gen = Rcpp::wrap(cID(probs, ncomp, Uv));
    return rcpp_result_gen;
END_RCPP
}
// change_labs
arma::uvec change_labs(arma::uvec orig, arma::uvec rand_perm);
RcppExport SEXP _BAMBI_change_labs(SEXP origSEXP, SEXP rand_permSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< arma::uvec >::type orig(origSEXP);
    Rcpp::traits::input_parameter< arma::uvec >::type rand_perm(rand_permSEXP);
    rcpp_result_gen = Rcpp::wrap(change_labs(orig, rand_perm));
    return rcpp_result_gen;
END_RCPP
}
// calc_corr_tau_2
double calc_corr_tau_2(Rcpp::NumericMatrix samp_mat);
RcppExport SEXP _BAMBI_calc_corr_tau_2(SEXP samp_matSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< Rcpp::NumericMatrix >::type samp_mat(samp_matSEXP);
    rcpp_result_gen = Rcpp::wrap(calc_corr_tau_2(samp_mat));
    return rcpp_result_gen;
END_RCPP
}
// calc_corr_tau_1
double calc_corr_tau_1(Rcpp::NumericMatrix samp_mat);
RcppExport SEXP _BAMBI_calc_corr_tau_1(SEXP samp_matSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< Rcpp::NumericMatrix >::type samp_mat(samp_matSEXP);
    rcpp_result_gen = Rcpp::wrap(calc_corr_tau_1(samp_mat));
    return rcpp_result_gen;
END_RCPP
}
// calc_corr_fl
double calc_corr_fl(Rcpp::NumericMatrix samp_mat);
RcppExport SEXP _BAMBI_calc_corr_fl(SEXP samp_matSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< Rcpp::NumericMatrix >::type samp_mat(samp_matSEXP);
    rcpp_result_gen = Rcpp::wrap(calc_corr_fl(samp_mat));
    return rcpp_result_gen;
END_RCPP
}
// const_univm
double const_univm(double k);
RcppExport SEXP _BAMBI_const_univm(SEXP kSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< double >::type k(kSEXP);
    rcpp_result_gen = Rcpp::wrap(const_univm(k));
    return rcpp_result_gen;
END_RCPP
}
// log_const_univm_all
arma::vec log_const_univm_all(arma::mat par_mat);
RcppExport SEXP _BAMBI_log_const_univm_all(SEXP par_matSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< arma::mat >::type par_mat(par_matSEXP);
    rcpp_result_gen = Rcpp::wrap(log_const_univm_all(par_mat));
    return rcpp_result_gen;
END_RCPP
}
// ldunivmnum
double ldunivmnum(double x, arma::vec par);
RcppExport SEXP _BAMBI_ldunivmnum(SEXP xSEXP, SEXP parSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< double >::type x(xSEXP);
    Rcpp::traits::input_parameter< arma::vec >::type par(parSEXP);
    rcpp_result_gen = Rcpp::wrap(ldunivmnum(x, par));
    return rcpp_result_gen;
END_RCPP
}
// dunivm_manyx_onepar
arma::vec dunivm_manyx_onepar(arma::vec x, double k, double mu);
RcppExport SEXP _BAMBI_dunivm_manyx_onepar(SEXP xSEXP, SEXP kSEXP, SEXP muSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< arma::vec >::type x(xSEXP);
    Rcpp::traits::input_parameter< double >::type k(kSEXP);
    Rcpp::traits::input_parameter< double >::type mu(muSEXP);
    rcpp_result_gen = Rcpp::wrap(dunivm_manyx_onepar(x, k, mu));
    return rcpp_result_gen;
END_RCPP
}
// dunivm_manyx_manypar
arma::vec dunivm_manyx_manypar(arma::vec x, arma::vec k, arma::vec mu);
RcppExport SEXP _BAMBI_dunivm_manyx_manypar(SEXP xSEXP, SEXP kSEXP, SEXP muSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< arma::vec >::type x(xSEXP);
    Rcpp::traits::input_parameter< arma::vec >::type k(kSEXP);
    Rcpp::traits::input_parameter< arma::vec >::type mu(muSEXP);
    rcpp_result_gen = Rcpp::wrap(dunivm_manyx_manypar(x, k, mu));
    return rcpp_result_gen;
END_RCPP
}
// dunivm_onex_manypar
arma::vec dunivm_onex_manypar(double x, arma::vec k, arma::vec mu);
RcppExport SEXP _BAMBI_dunivm_onex_manypar(SEXP xSEXP, SEXP kSEXP, SEXP muSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< double >::type x(xSEXP);
    Rcpp::traits::input_parameter< arma::vec >::type k(kSEXP);
    Rcpp::traits::input_parameter< arma::vec >::type mu(muSEXP);
    rcpp_result_gen = Rcpp::wrap(dunivm_onex_manypar(x, k, mu));
    return rcpp_result_gen;
END_RCPP
}
// runivm_onepar
arma::vec runivm_onepar(int n, double k, double mu);
RcppExport SEXP _BAMBI_runivm_onepar(SEXP nSEXP, SEXP kSEXP, SEXP muSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< int >::type n(nSEXP);
    Rcpp::traits::input_parameter< double >::type k(kSEXP);
    Rcpp::traits::input_parameter< double >::type mu(muSEXP);
    rcpp_result_gen = Rcpp::wrap(runivm_onepar(n, k, mu));
    return rcpp_result_gen;
END_RCPP
}
// runivm_manypar
arma::mat runivm_manypar(arma::vec k, arma::vec mu);
RcppExport SEXP _BAMBI_runivm_manypar(SEXP kSEXP, SEXP muSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< arma::vec >::type k(kSEXP);
    Rcpp::traits::input_parameter< arma::vec >::type mu(muSEXP);
    rcpp_result_gen = Rcpp::wrap(runivm_manypar(k, mu));
    return rcpp_result_gen;
END_RCPP
}
// univmmix
double univmmix(double x, arma::mat par, arma::vec pi, arma::vec log_c_von);
RcppExport SEXP _BAMBI_univmmix(SEXP xSEXP, SEXP parSEXP, SEXP piSEXP, SEXP log_c_vonSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< double >::type x(xSEXP);
    Rcpp::traits::input_parameter< arma::mat >::type par(parSEXP);
    Rcpp::traits::input_parameter< arma::vec >::type pi(piSEXP);
    Rcpp::traits::input_parameter< arma::vec >::type log_c_von(log_c_vonSEXP);
    rcpp_result_gen = Rcpp::wrap(univmmix(x, par, pi, log_c_von));
    return rcpp_result_gen;
END_RCPP
}
// univmmix_manyx
arma::vec univmmix_manyx(arma::vec x, arma::mat par, arma::vec pi, arma::vec log_c);
RcppExport SEXP _BAMBI_univmmix_manyx(SEXP xSEXP, SEXP parSEXP, SEXP piSEXP, SEXP log_cSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< arma::vec >::type x(xSEXP);
    Rcpp::traits::input_parameter< arma::mat >::type par(parSEXP);
    Rcpp::traits::input_parameter< arma::vec >::type pi(piSEXP);
    Rcpp::traits::input_parameter< arma::vec >::type log_c(log_cSEXP);
    rcpp_result_gen = Rcpp::wrap(univmmix_manyx(x, par, pi, log_c));
    return rcpp_result_gen;
END_RCPP
}
// mem_p_univm
arma::mat mem_p_univm(arma::vec data, arma::mat par, arma::vec pi, arma::vec log_c_von);
RcppExport SEXP _BAMBI_mem_p_univm(SEXP dataSEXP, SEXP parSEXP, SEXP piSEXP, SEXP log_c_vonSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< arma::vec >::type data(dataSEXP);
    Rcpp::traits::input_parameter< arma::mat >::type par(parSEXP);
    Rcpp::traits::input_parameter< arma::vec >::type pi(piSEXP);
    Rcpp::traits::input_parameter< arma::vec >::type log_c_von(log_c_vonSEXP);
    rcpp_result_gen = Rcpp::wrap(mem_p_univm(data, par, pi, log_c_von));
    return rcpp_result_gen;
END_RCPP
}
// llik_univm_one_comp
double llik_univm_one_comp(arma::vec data, arma::vec par_vec, double log_c);
RcppExport SEXP _BAMBI_llik_univm_one_comp(SEXP dataSEXP, SEXP par_vecSEXP, SEXP log_cSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< arma::vec >::type data(dataSEXP);
    Rcpp::traits::input_parameter< arma::vec >::type par_vec(par_vecSEXP);
    Rcpp::traits::input_parameter< double >::type log_c(log_cSEXP);
    rcpp_result_gen = Rcpp::wrap(llik_univm_one_comp(data, par_vec, log_c));
    return rcpp_result_gen;
END_RCPP
}
// grad_llik_univm_C
arma::vec grad_llik_univm_C(arma::vec data, arma::vec par);
RcppExport SEXP _BAMBI_grad_llik_univm_C(SEXP dataSEXP, SEXP parSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< arma::vec >::type data(dataSEXP);
    Rcpp::traits::input_parameter< arma::vec >::type par(parSEXP);
    rcpp_result_gen = Rcpp::wrap(grad_llik_univm_C(data, par));
    return rcpp_result_gen;
END_RCPP
}
// llik_univm_contri_C
arma::vec llik_univm_contri_C(arma::vec data, arma::mat par, arma::vec pi, arma::vec log_c);
RcppExport SEXP _BAMBI_llik_univm_contri_C(SEXP dataSEXP, SEXP parSEXP, SEXP piSEXP, SEXP log_cSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< arma::vec >::type data(dataSEXP);
    Rcpp::traits::input_parameter< arma::mat >::type par(parSEXP);
    Rcpp::traits::input_parameter< arma::vec >::type pi(piSEXP);
    Rcpp::traits::input_parameter< arma::vec >::type log_c(log_cSEXP);
    rcpp_result_gen = Rcpp::wrap(llik_univm_contri_C(data, par, pi, log_c));
    return rcpp_result_gen;
END_RCPP
}
// l_const_uniwnorm
double l_const_uniwnorm(double k);
RcppExport SEXP _BAMBI_l_const_uniwnorm(SEXP kSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< double >::type k(kSEXP);
    rcpp_result_gen = Rcpp::wrap(l_const_uniwnorm(k));
    return rcpp_result_gen;
END_RCPP
}
// const_uniwnorm
double const_uniwnorm(double k);
RcppExport SEXP _BAMBI_const_uniwnorm(SEXP kSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< double >::type k(kSEXP);
    rcpp_result_gen = Rcpp::wrap(const_uniwnorm(k));
    return rcpp_result_gen;
END_RCPP
}
// log_const_uniwnorm_all
arma::vec log_const_uniwnorm_all(arma::mat par_mat);
RcppExport SEXP _BAMBI_log_const_uniwnorm_all(SEXP par_matSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< arma::mat >::type par_mat(par_matSEXP);
    rcpp_result_gen = Rcpp::wrap(log_const_uniwnorm_all(par_mat));
    return rcpp_result_gen;
END_RCPP
}
// lduniwnormnum
double lduniwnormnum(double x, arma::vec par, arma::vec omega_2pi_1d);
RcppExport SEXP _BAMBI_lduniwnormnum(SEXP xSEXP, SEXP parSEXP, SEXP omega_2pi_1dSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< double >::type x(xSEXP);
    Rcpp::traits::input_parameter< arma::vec >::type par(parSEXP);
    Rcpp::traits::input_parameter< arma::vec >::type omega_2pi_1d(omega_2pi_1dSEXP);
    rcpp_result_gen = Rcpp::wrap(lduniwnormnum(x, par, omega_2pi_1d));
    return rcpp_result_gen;
END_RCPP
}
// duniwnorm_manyx_onepar
arma::vec duniwnorm_manyx_onepar(arma::vec x, double k, double mu, arma::vec omega_2pi_1d);
RcppExport SEXP _BAMBI_duniwnorm_manyx_onepar(SEXP xSEXP, SEXP kSEXP, SEXP muSEXP, SEXP omega_2pi_1dSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< arma::vec >::type x(xSEXP);
    Rcpp::traits::input_parameter< double >::type k(kSEXP);
    Rcpp::traits::input_parameter< double >::type mu(muSEXP);
    Rcpp::traits::input_parameter< arma::vec >::type omega_2pi_1d(omega_2pi_1dSEXP);
    rcpp_result_gen = Rcpp::wrap(duniwnorm_manyx_onepar(x, k, mu, omega_2pi_1d));
    return rcpp_result_gen;
END_RCPP
}
// duniwnorm_manyx_manypar
arma::vec duniwnorm_manyx_manypar(arma::vec x, arma::vec k, arma::vec mu, arma::vec omega_2pi_1d);
RcppExport SEXP _BAMBI_duniwnorm_manyx_manypar(SEXP xSEXP, SEXP kSEXP, SEXP muSEXP, SEXP omega_2pi_1dSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< arma::vec >::type x(xSEXP);
    Rcpp::traits::input_parameter< arma::vec >::type k(kSEXP);
    Rcpp::traits::input_parameter< arma::vec >::type mu(muSEXP);
    Rcpp::traits::input_parameter< arma::vec >::type omega_2pi_1d(omega_2pi_1dSEXP);
    rcpp_result_gen = Rcpp::wrap(duniwnorm_manyx_manypar(x, k, mu, omega_2pi_1d));
    return rcpp_result_gen;
END_RCPP
}
// duniwnorm_onex_manypar
arma::vec duniwnorm_onex_manypar(double x, arma::vec k, arma::vec mu, arma::vec omega_2pi_1d);
RcppExport SEXP _BAMBI_duniwnorm_onex_manypar(SEXP xSEXP, SEXP kSEXP, SEXP muSEXP, SEXP omega_2pi_1dSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< double >::type x(xSEXP);
    Rcpp::traits::input_parameter< arma::vec >::type k(kSEXP);
    Rcpp::traits::input_parameter< arma::vec >::type mu(muSEXP);
    Rcpp::traits::input_parameter< arma::vec >::type omega_2pi_1d(omega_2pi_1dSEXP);
    rcpp_result_gen = Rcpp::wrap(duniwnorm_onex_manypar(x, k, mu, omega_2pi_1d));
    return rcpp_result_gen;
END_RCPP
}
// mem_p_uniwnorm
arma::mat mem_p_uniwnorm(arma::vec data, arma::mat par, arma::vec pi, arma::vec log_c_von, arma::vec omega_2pi_1d);
RcppExport SEXP _BAMBI_mem_p_uniwnorm(SEXP dataSEXP, SEXP parSEXP, SEXP piSEXP, SEXP log_c_vonSEXP, SEXP omega_2pi_1dSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< arma::vec >::type data(dataSEXP);
    Rcpp::traits::input_parameter< arma::mat >::type par(parSEXP);
    Rcpp::traits::input_parameter< arma::vec >::type pi(piSEXP);
    Rcpp::traits::input_parameter< arma::vec >::type log_c_von(log_c_vonSEXP);
    Rcpp::traits::input_parameter< arma::vec >::type omega_2pi_1d(omega_2pi_1dSEXP);
    rcpp_result_gen = Rcpp::wrap(mem_p_uniwnorm(data, par, pi, log_c_von, omega_2pi_1d));
    return rcpp_result_gen;
END_RCPP
}
// llik_uniwnorm_contri_C
arma::vec llik_uniwnorm_contri_C(arma::vec data, arma::mat par, arma::vec pi, arma::vec log_c, arma::vec omega_2pi_1d);
RcppExport SEXP _BAMBI_llik_uniwnorm_contri_C(SEXP dataSEXP, SEXP parSEXP, SEXP piSEXP, SEXP log_cSEXP, SEXP omega_2pi_1dSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< arma::vec >::type data(dataSEXP);
    Rcpp::traits::input_parameter< arma::mat >::type par(parSEXP);
    Rcpp::traits::input_parameter< arma::vec >::type pi(piSEXP);
    Rcpp::traits::input_parameter< arma::vec >::type log_c(log_cSEXP);
    Rcpp::traits::input_parameter< arma::vec >::type omega_2pi_1d(omega_2pi_1dSEXP);
    rcpp_result_gen = Rcpp::wrap(llik_uniwnorm_contri_C(data, par, pi, log_c, omega_2pi_1d));
    return rcpp_result_gen;
END_RCPP
}
// llik_uniwnorm_one_comp
double llik_uniwnorm_one_comp(arma::vec data, arma::vec par_vec, double log_c, arma::vec omega_2pi_1d);
RcppExport SEXP _BAMBI_llik_uniwnorm_one_comp(SEXP dataSEXP, SEXP par_vecSEXP, SEXP log_cSEXP, SEXP omega_2pi_1dSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< arma::vec >::type data(dataSEXP);
    Rcpp::traits::input_parameter< arma::vec >::type par_vec(par_vecSEXP);
    Rcpp::traits::input_parameter< double >::type log_c(log_cSEXP);
    Rcpp::traits::input_parameter< arma::vec >::type omega_2pi_1d(omega_2pi_1dSEXP);
    rcpp_result_gen = Rcpp::wrap(llik_uniwnorm_one_comp(data, par_vec, log_c, omega_2pi_1d));
    return rcpp_result_gen;
END_RCPP
}
// grad_llik_uniwnorm_C
arma::vec grad_llik_uniwnorm_C(arma::vec data, arma::vec par, arma::vec omega_2pi_1d);
RcppExport SEXP _BAMBI_grad_llik_uniwnorm_C(SEXP dataSEXP, SEXP parSEXP, SEXP omega_2pi_1dSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< arma::vec >::type data(dataSEXP);
    Rcpp::traits::input_parameter< arma::vec >::type par(parSEXP);
    Rcpp::traits::input_parameter< arma::vec >::type omega_2pi_1d(omega_2pi_1dSEXP);
    rcpp_result_gen = Rcpp::wrap(grad_llik_uniwnorm_C(data, par, omega_2pi_1d));
    return rcpp_result_gen;
END_RCPP
}
// BESSI0_C
double BESSI0_C(double x);
RcppExport SEXP _BAMBI_BESSI0_C(SEXP xSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< double >::type x(xSEXP);
    rcpp_result_gen = Rcpp::wrap(BESSI0_C(x));
    return rcpp_result_gen;
END_RCPP
}
// const_vmcos_anltc
double const_vmcos_anltc(double k1, double k2, double k3);
RcppExport SEXP _BAMBI_const_vmcos_anltc(SEXP k1SEXP, SEXP k2SEXP, SEXP k3SEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< double >::type k1(k1SEXP);
    Rcpp::traits::input_parameter< double >::type k2(k2SEXP);
    Rcpp::traits::input_parameter< double >::type k3(k3SEXP);
    rcpp_result_gen = Rcpp::wrap(const_vmcos_anltc(k1, k2, k3));
    return rcpp_result_gen;
END_RCPP
}
// const_vmcos_mc
double const_vmcos_mc(double k1, double k2, double k3, arma::mat uni_rand, bool return_log);
RcppExport SEXP _BAMBI_const_vmcos_mc(SEXP k1SEXP, SEXP k2SEXP, SEXP k3SEXP, SEXP uni_randSEXP, SEXP return_logSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< double >::type k1(k1SEXP);
    Rcpp::traits::input_parameter< double >::type k2(k2SEXP);
    Rcpp::traits::input_parameter< double >::type k3(k3SEXP);
    Rcpp::traits::input_parameter< arma::mat >::type uni_rand(uni_randSEXP);
    Rcpp::traits::input_parameter< bool >::type return_log(return_logSEXP);
    rcpp_result_gen = Rcpp::wrap(const_vmcos_mc(k1, k2, k3, uni_rand, return_log));
    return rcpp_result_gen;
END_RCPP
}
// const_vmcos
double const_vmcos(double k1, double k2, double k3, arma::mat uni_rand, bool return_log);
RcppExport SEXP _BAMBI_const_vmcos(SEXP k1SEXP, SEXP k2SEXP, SEXP k3SEXP, SEXP uni_randSEXP, SEXP return_logSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< double >::type k1(k1SEXP);
    Rcpp::traits::input_parameter< double >::type k2(k2SEXP);
    Rcpp::traits::input_parameter< double >::type k3(k3SEXP);
    Rcpp::traits::input_parameter< arma::mat >::type uni_rand(uni_randSEXP);
    Rcpp::traits::input_parameter< bool >::type return_log(return_logSEXP);
    rcpp_result_gen = Rcpp::wrap(const_vmcos(k1, k2, k3, uni_rand, return_log));
    return rcpp_result_gen;
END_RCPP
}
// d_const_vmcos_anltc
arma::vec d_const_vmcos_anltc(double k1, double k2, double k3);
RcppExport SEXP _BAMBI_d_const_vmcos_anltc(SEXP k1SEXP, SEXP k2SEXP, SEXP k3SEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< double >::type k1(k1SEXP);
    Rcpp::traits::input_parameter< double >::type k2(k2SEXP);
    Rcpp::traits::input_parameter< double >::type k3(k3SEXP);
    rcpp_result_gen = Rcpp::wrap(d_const_vmcos_anltc(k1, k2, k3));
    return rcpp_result_gen;
END_RCPP
}
// d_const_vmcos_mc
arma::vec d_const_vmcos_mc(double k1, double k2, double k3, arma::mat uni_rand, int ncores);
RcppExport SEXP _BAMBI_d_const_vmcos_mc(SEXP k1SEXP, SEXP k2SEXP, SEXP k3SEXP, SEXP uni_randSEXP, SEXP ncoresSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< double >::type k1(k1SEXP);
    Rcpp::traits::input_parameter< double >::type k2(k2SEXP);
    Rcpp::traits::input_parameter< double >::type k3(k3SEXP);
    Rcpp::traits::input_parameter< arma::mat >::type uni_rand(uni_randSEXP);
    Rcpp::traits::input_parameter< int >::type ncores(ncoresSEXP);
    rcpp_result_gen = Rcpp::wrap(d_const_vmcos_mc(k1, k2, k3, uni_rand, ncores));
    return rcpp_result_gen;
END_RCPP
}
// d_const_vmcos
arma::vec d_const_vmcos(arma::vec par, arma::mat uni_rand, int ncores);
RcppExport SEXP _BAMBI_d_const_vmcos(SEXP parSEXP, SEXP uni_randSEXP, SEXP ncoresSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< arma::vec >::type par(parSEXP);
    Rcpp::traits::input_parameter< arma::mat >::type uni_rand(uni_randSEXP);
    Rcpp::traits::input_parameter< int >::type ncores(ncoresSEXP);
    rcpp_result_gen = Rcpp::wrap(d_const_vmcos(par, uni_rand, ncores));
    return rcpp_result_gen;
END_RCPP
}
// log_const_vmcos_all
arma::vec log_const_vmcos_all(arma::mat par_mat, arma::mat uni_rand);
RcppExport SEXP _BAMBI_log_const_vmcos_all(SEXP par_matSEXP, SEXP uni_randSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< arma::mat >::type par_mat(par_matSEXP);
    Rcpp::traits::input_parameter< arma::mat >::type uni_rand(uni_randSEXP);
    rcpp_result_gen = Rcpp::wrap(log_const_vmcos_all(par_mat, uni_rand));
    return rcpp_result_gen;
END_RCPP
}
// ldcosnum
double ldcosnum(double x, double y, arma::vec par);
RcppExport SEXP _BAMBI_ldcosnum(SEXP xSEXP, SEXP ySEXP, SEXP parSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< double >::type x(xSEXP);
    Rcpp::traits::input_parameter< double >::type y(ySEXP);
    Rcpp::traits::input_parameter< arma::vec >::type par(parSEXP);
    rcpp_result_gen = Rcpp::wrap(ldcosnum(x, y, par));
    return rcpp_result_gen;
END_RCPP
}
// dcos_onex_manypar
arma::vec dcos_onex_manypar(arma::vec x, arma::vec k1, arma::vec k2, arma::vec k3, arma::vec mu1, arma::vec mu2, arma::vec l_const_all);
RcppExport SEXP _BAMBI_dcos_onex_manypar(SEXP xSEXP, SEXP k1SEXP, SEXP k2SEXP, SEXP k3SEXP, SEXP mu1SEXP, SEXP mu2SEXP, SEXP l_const_allSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< arma::vec >::type x(xSEXP);
    Rcpp::traits::input_parameter< arma::vec >::type k1(k1SEXP);
    Rcpp::traits::input_parameter< arma::vec >::type k2(k2SEXP);
    Rcpp::traits::input_parameter< arma::vec >::type k3(k3SEXP);
    Rcpp::traits::input_parameter< arma::vec >::type mu1(mu1SEXP);
    Rcpp::traits::input_parameter< arma::vec >::type mu2(mu2SEXP);
    Rcpp::traits::input_parameter< arma::vec >::type l_const_all(l_const_allSEXP);
    rcpp_result_gen = Rcpp::wrap(dcos_onex_manypar(x, k1, k2, k3, mu1, mu2, l_const_all));
    return rcpp_result_gen;
END_RCPP
}
// dcos_manyx_onepar
arma::vec dcos_manyx_onepar(arma::mat x, double k1, double k2, double k3, double mu1, double mu2, double l_const);
RcppExport SEXP _BAMBI_dcos_manyx_onepar(SEXP xSEXP, SEXP k1SEXP, SEXP k2SEXP, SEXP k3SEXP, SEXP mu1SEXP, SEXP mu2SEXP, SEXP l_constSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< arma::mat >::type x(xSEXP);
    Rcpp::traits::input_parameter< double >::type k1(k1SEXP);
    Rcpp::traits::input_parameter< double >::type k2(k2SEXP);
    Rcpp::traits::input_parameter< double >::type k3(k3SEXP);
    Rcpp::traits::input_parameter< double >::type mu1(mu1SEXP);
    Rcpp::traits::input_parameter< double >::type mu2(mu2SEXP);
    Rcpp::traits::input_parameter< double >::type l_const(l_constSEXP);
    rcpp_result_gen = Rcpp::wrap(dcos_manyx_onepar(x, k1, k2, k3, mu1, mu2, l_const));
    return rcpp_result_gen;
END_RCPP
}
// dcos_manyx_manypar
arma::vec dcos_manyx_manypar(arma::mat x, arma::vec k1, arma::vec k2, arma::vec k3, arma::vec mu1, arma::vec mu2, arma::vec l_const_all);
RcppExport SEXP _BAMBI_dcos_manyx_manypar(SEXP xSEXP, SEXP k1SEXP, SEXP k2SEXP, SEXP k3SEXP, SEXP mu1SEXP, SEXP mu2SEXP, SEXP l_const_allSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< arma::mat >::type x(xSEXP);
    Rcpp::traits::input_parameter< arma::vec >::type k1(k1SEXP);
    Rcpp::traits::input_parameter< arma::vec >::type k2(k2SEXP);
    Rcpp::traits::input_parameter< arma::vec >::type k3(k3SEXP);
    Rcpp::traits::input_parameter< arma::vec >::type mu1(mu1SEXP);
    Rcpp::traits::input_parameter< arma::vec >::type mu2(mu2SEXP);
    Rcpp::traits::input_parameter< arma::vec >::type l_const_all(l_const_allSEXP);
    rcpp_result_gen = Rcpp::wrap(dcos_manyx_manypar(x, k1, k2, k3, mu1, mu2, l_const_all));
    return rcpp_result_gen;
END_RCPP
}
// rcos_unimodal
arma::mat rcos_unimodal(int n, double k1, double k2, double k3, double mu1, double mu2, double kappa_opt, double log_I0_kappa_opt, double logK, double log_const_vmcos);
RcppExport SEXP _BAMBI_rcos_unimodal(SEXP nSEXP, SEXP k1SEXP, SEXP k2SEXP, SEXP k3SEXP, SEXP mu1SEXP, SEXP mu2SEXP, SEXP kappa_optSEXP, SEXP log_I0_kappa_optSEXP, SEXP logKSEXP, SEXP log_const_vmcosSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< int >::type n(nSEXP);
    Rcpp::traits::input_parameter< double >::type k1(k1SEXP);
    Rcpp::traits::input_parameter< double >::type k2(k2SEXP);
    Rcpp::traits::input_parameter< double >::type k3(k3SEXP);
    Rcpp::traits::input_parameter< double >::type mu1(mu1SEXP);
    Rcpp::traits::input_parameter< double >::type mu2(mu2SEXP);
    Rcpp::traits::input_parameter< double >::type kappa_opt(kappa_optSEXP);
    Rcpp::traits::input_parameter< double >::type log_I0_kappa_opt(log_I0_kappa_optSEXP);
    Rcpp::traits::input_parameter< double >::type logK(logKSEXP);
    Rcpp::traits::input_parameter< double >::type log_const_vmcos(log_const_vmcosSEXP);
    rcpp_result_gen = Rcpp::wrap(rcos_unimodal(n, k1, k2, k3, mu1, mu2, kappa_opt, log_I0_kappa_opt, logK, log_const_vmcos));
    return rcpp_result_gen;
END_RCPP
}
// rcos_bimodal
arma::mat rcos_bimodal(int n, double k1, double k2, double k3, double mu1, double mu2, double kappa_opt, double log_I0_kappa_opt, double logK, double log_const_vmcos, double mode_1, double mode_2, double vmpropn, double unifpropn);
RcppExport SEXP _BAMBI_rcos_bimodal(SEXP nSEXP, SEXP k1SEXP, SEXP k2SEXP, SEXP k3SEXP, SEXP mu1SEXP, SEXP mu2SEXP, SEXP kappa_optSEXP, SEXP log_I0_kappa_optSEXP, SEXP logKSEXP, SEXP log_const_vmcosSEXP, SEXP mode_1SEXP, SEXP mode_2SEXP, SEXP vmpropnSEXP, SEXP unifpropnSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< int >::type n(nSEXP);
    Rcpp::traits::input_parameter< double >::type k1(k1SEXP);
    Rcpp::traits::input_parameter< double >::type k2(k2SEXP);
    Rcpp::traits::input_parameter< double >::type k3(k3SEXP);
    Rcpp::traits::input_parameter< double >::type mu1(mu1SEXP);
    Rcpp::traits::input_parameter< double >::type mu2(mu2SEXP);
    Rcpp::traits::input_parameter< double >::type kappa_opt(kappa_optSEXP);
    Rcpp::traits::input_parameter< double >::type log_I0_kappa_opt(log_I0_kappa_optSEXP);
    Rcpp::traits::input_parameter< double >::type logK(logKSEXP);
    Rcpp::traits::input_parameter< double >::type log_const_vmcos(log_const_vmcosSEXP);
    Rcpp::traits::input_parameter< double >::type mode_1(mode_1SEXP);
    Rcpp::traits::input_parameter< double >::type mode_2(mode_2SEXP);
    Rcpp::traits::input_parameter< double >::type vmpropn(vmpropnSEXP);
    Rcpp::traits::input_parameter< double >::type unifpropn(unifpropnSEXP);
    rcpp_result_gen = Rcpp::wrap(rcos_bimodal(n, k1, k2, k3, mu1, mu2, kappa_opt, log_I0_kappa_opt, logK, log_const_vmcos, mode_1, mode_2, vmpropn, unifpropn));
    return rcpp_result_gen;
END_RCPP
}
// rcos_onepar
arma::mat rcos_onepar(int n, double k1, double k2, double k3, double mu1, double mu2, double I_upper_bd);
RcppExport SEXP _BAMBI_rcos_onepar(SEXP nSEXP, SEXP k1SEXP, SEXP k2SEXP, SEXP k3SEXP, SEXP mu1SEXP, SEXP mu2SEXP, SEXP I_upper_bdSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< int >::type n(nSEXP);
    Rcpp::traits::input_parameter< double >::type k1(k1SEXP);
    Rcpp::traits::input_parameter< double >::type k2(k2SEXP);
    Rcpp::traits::input_parameter< double >::type k3(k3SEXP);
    Rcpp::traits::input_parameter< double >::type mu1(mu1SEXP);
    Rcpp::traits::input_parameter< double >::type mu2(mu2SEXP);
    Rcpp::traits::input_parameter< double >::type I_upper_bd(I_upper_bdSEXP);
    rcpp_result_gen = Rcpp::wrap(rcos_onepar(n, k1, k2, k3, mu1, mu2, I_upper_bd));
    return rcpp_result_gen;
END_RCPP
}
// mem_p_cos
arma::mat mem_p_cos(arma::mat data, arma::mat par, arma::vec pi, arma::vec log_c_von);
RcppExport SEXP _BAMBI_mem_p_cos(SEXP dataSEXP, SEXP parSEXP, SEXP piSEXP, SEXP log_c_vonSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< arma::mat >::type data(dataSEXP);
    Rcpp::traits::input_parameter< arma::mat >::type par(parSEXP);
    Rcpp::traits::input_parameter< arma::vec >::type pi(piSEXP);
    Rcpp::traits::input_parameter< arma::vec >::type log_c_von(log_c_vonSEXP);
    rcpp_result_gen = Rcpp::wrap(mem_p_cos(data, par, pi, log_c_von));
    return rcpp_result_gen;
END_RCPP
}
// llik_vmcos_contri_C
arma::vec llik_vmcos_contri_C(arma::mat data, arma::mat par, arma::vec pi, arma::vec log_c);
RcppExport SEXP _BAMBI_llik_vmcos_contri_C(SEXP dataSEXP, SEXP parSEXP, SEXP piSEXP, SEXP log_cSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< arma::mat >::type data(dataSEXP);
    Rcpp::traits::input_parameter< arma::mat >::type par(parSEXP);
    Rcpp::traits::input_parameter< arma::vec >::type pi(piSEXP);
    Rcpp::traits::input_parameter< arma::vec >::type log_c(log_cSEXP);
    rcpp_result_gen = Rcpp::wrap(llik_vmcos_contri_C(data, par, pi, log_c));
    return rcpp_result_gen;
END_RCPP
}
// llik_vmcos_one_comp
double llik_vmcos_one_comp(arma::mat data, arma::vec par_vec, double log_c);
RcppExport SEXP _BAMBI_llik_vmcos_one_comp(SEXP dataSEXP, SEXP par_vecSEXP, SEXP log_cSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< arma::mat >::type data(dataSEXP);
    Rcpp::traits::input_parameter< arma::vec >::type par_vec(par_vecSEXP);
    Rcpp::traits::input_parameter< double >::type log_c(log_cSEXP);
    rcpp_result_gen = Rcpp::wrap(llik_vmcos_one_comp(data, par_vec, log_c));
    return rcpp_result_gen;
END_RCPP
}
// grad_llik_vmcos_C
arma::vec grad_llik_vmcos_C(arma::mat data, arma::vec par, arma::mat uni_rand);
RcppExport SEXP _BAMBI_grad_llik_vmcos_C(SEXP dataSEXP, SEXP parSEXP, SEXP uni_randSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< arma::mat >::type data(dataSEXP);
    Rcpp::traits::input_parameter< arma::vec >::type par(parSEXP);
    Rcpp::traits::input_parameter< arma::mat >::type uni_rand(uni_randSEXP);
    rcpp_result_gen = Rcpp::wrap(grad_llik_vmcos_C(data, par, uni_rand));
    return rcpp_result_gen;
END_RCPP
}
// vmcos_var_corr_anltc
List vmcos_var_corr_anltc(double k1, double k2, double k3);
RcppExport SEXP _BAMBI_vmcos_var_corr_anltc(SEXP k1SEXP, SEXP k2SEXP, SEXP k3SEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< double >::type k1(k1SEXP);
    Rcpp::traits::input_parameter< double >::type k2(k2SEXP);
    Rcpp::traits::input_parameter< double >::type k3(k3SEXP);
    rcpp_result_gen = Rcpp::wrap(vmcos_var_corr_anltc(k1, k2, k3));
    return rcpp_result_gen;
END_RCPP
}
// vmcos_var_corr_mc
List vmcos_var_corr_mc(double k1, double k2, double k3, arma::mat uni_rand, int ncores);
RcppExport SEXP _BAMBI_vmcos_var_corr_mc(SEXP k1SEXP, SEXP k2SEXP, SEXP k3SEXP, SEXP uni_randSEXP, SEXP ncoresSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< double >::type k1(k1SEXP);
    Rcpp::traits::input_parameter< double >::type k2(k2SEXP);
    Rcpp::traits::input_parameter< double >::type k3(k3SEXP);
    Rcpp::traits::input_parameter< arma::mat >::type uni_rand(uni_randSEXP);
    Rcpp::traits::input_parameter< int >::type ncores(ncoresSEXP);
    rcpp_result_gen = Rcpp::wrap(vmcos_var_corr_mc(k1, k2, k3, uni_rand, ncores));
    return rcpp_result_gen;
END_RCPP
}
// vmcos_var_cor_singlepar_cpp
List vmcos_var_cor_singlepar_cpp(double k1, double k2, double k3, arma::mat uni_rand, int ncores);
RcppExport SEXP _BAMBI_vmcos_var_cor_singlepar_cpp(SEXP k1SEXP, SEXP k2SEXP, SEXP k3SEXP, SEXP uni_randSEXP, SEXP ncoresSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< double >::type k1(k1SEXP);
    Rcpp::traits::input_parameter< double >::type k2(k2SEXP);
    Rcpp::traits::input_parameter< double >::type k3(k3SEXP);
    Rcpp::traits::input_parameter< arma::mat >::type uni_rand(uni_randSEXP);
    Rcpp::traits::input_parameter< int >::type ncores(ncoresSEXP);
    rcpp_result_gen = Rcpp::wrap(vmcos_var_cor_singlepar_cpp(k1, k2, k3, uni_rand, ncores));
    return rcpp_result_gen;
END_RCPP
}
// ldcos_onex_manypar
arma::vec ldcos_onex_manypar(arma::vec x, arma::vec k1, arma::vec k2, arma::vec k3, arma::vec mu1, arma::vec mu2, arma::vec l_const_all);
RcppExport SEXP _BAMBI_ldcos_onex_manypar(SEXP xSEXP, SEXP k1SEXP, SEXP k2SEXP, SEXP k3SEXP, SEXP mu1SEXP, SEXP mu2SEXP, SEXP l_const_allSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< arma::vec >::type x(xSEXP);
    Rcpp::traits::input_parameter< arma::vec >::type k1(k1SEXP);
    Rcpp::traits::input_parameter< arma::vec >::type k2(k2SEXP);
    Rcpp::traits::input_parameter< arma::vec >::type k3(k3SEXP);
    Rcpp::traits::input_parameter< arma::vec >::type mu1(mu1SEXP);
    Rcpp::traits::input_parameter< arma::vec >::type mu2(mu2SEXP);
    Rcpp::traits::input_parameter< arma::vec >::type l_const_all(l_const_allSEXP);
    rcpp_result_gen = Rcpp::wrap(ldcos_onex_manypar(x, k1, k2, k3, mu1, mu2, l_const_all));
    return rcpp_result_gen;
END_RCPP
}
// ldcos_manyx_onepar
arma::vec ldcos_manyx_onepar(arma::mat x, double k1, double k2, double k3, double mu1, double mu2, double l_const);
RcppExport SEXP _BAMBI_ldcos_manyx_onepar(SEXP xSEXP, SEXP k1SEXP, SEXP k2SEXP, SEXP k3SEXP, SEXP mu1SEXP, SEXP mu2SEXP, SEXP l_constSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< arma::mat >::type x(xSEXP);
    Rcpp::traits::input_parameter< double >::type k1(k1SEXP);
    Rcpp::traits::input_parameter< double >::type k2(k2SEXP);
    Rcpp::traits::input_parameter< double >::type k3(k3SEXP);
    Rcpp::traits::input_parameter< double >::type mu1(mu1SEXP);
    Rcpp::traits::input_parameter< double >::type mu2(mu2SEXP);
    Rcpp::traits::input_parameter< double >::type l_const(l_constSEXP);
    rcpp_result_gen = Rcpp::wrap(ldcos_manyx_onepar(x, k1, k2, k3, mu1, mu2, l_const));
    return rcpp_result_gen;
END_RCPP
}
// ldcos_manyx_manypar
arma::vec ldcos_manyx_manypar(arma::mat x, arma::vec k1, arma::vec k2, arma::vec k3, arma::vec mu1, arma::vec mu2, arma::vec l_const_all);
RcppExport SEXP _BAMBI_ldcos_manyx_manypar(SEXP xSEXP, SEXP k1SEXP, SEXP k2SEXP, SEXP k3SEXP, SEXP mu1SEXP, SEXP mu2SEXP, SEXP l_const_allSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< arma::mat >::type x(xSEXP);
    Rcpp::traits::input_parameter< arma::vec >::type k1(k1SEXP);
    Rcpp::traits::input_parameter< arma::vec >::type k2(k2SEXP);
    Rcpp::traits::input_parameter< arma::vec >::type k3(k3SEXP);
    Rcpp::traits::input_parameter< arma::vec >::type mu1(mu1SEXP);
    Rcpp::traits::input_parameter< arma::vec >::type mu2(mu2SEXP);
    Rcpp::traits::input_parameter< arma::vec >::type l_const_all(l_const_allSEXP);
    rcpp_result_gen = Rcpp::wrap(ldcos_manyx_manypar(x, k1, k2, k3, mu1, mu2, l_const_all));
    return rcpp_result_gen;
END_RCPP
}
// const_vmsin
double const_vmsin(double k1, double k2, double lambda);
RcppExport SEXP _BAMBI_const_vmsin(SEXP k1SEXP, SEXP k2SEXP, SEXP lambdaSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< double >::type k1(k1SEXP);
    Rcpp::traits::input_parameter< double >::type k2(k2SEXP);
    Rcpp::traits::input_parameter< double >::type lambda(lambdaSEXP);
    rcpp_result_gen = Rcpp::wrap(const_vmsin(k1, k2, lambda));
    return rcpp_result_gen;
END_RCPP
}
// d_const_vmsin
arma::vec d_const_vmsin(arma::vec par);
RcppExport SEXP _BAMBI_d_const_vmsin(SEXP parSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< arma::vec >::type par(parSEXP);
    rcpp_result_gen = Rcpp::wrap(d_const_vmsin(par));
    return rcpp_result_gen;
END_RCPP
}
// log_const_vmsin_all
arma::vec log_const_vmsin_all(arma::mat par_mat);
RcppExport SEXP _BAMBI_log_const_vmsin_all(SEXP par_matSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< arma::mat >::type par_mat(par_matSEXP);
    rcpp_result_gen = Rcpp::wrap(log_const_vmsin_all(par_mat));
    return rcpp_result_gen;
END_RCPP
}
// ldsinnum
double ldsinnum(double x, double y, arma::vec par);
RcppExport SEXP _BAMBI_ldsinnum(SEXP xSEXP, SEXP ySEXP, SEXP parSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< double >::type x(xSEXP);
    Rcpp::traits::input_parameter< double >::type y(ySEXP);
    Rcpp::traits::input_parameter< arma::vec >::type par(parSEXP);
    rcpp_result_gen = Rcpp::wrap(ldsinnum(x, y, par));
    return rcpp_result_gen;
END_RCPP
}
// dsin_onex_manypar
arma::vec dsin_onex_manypar(arma::vec x, arma::vec k1, arma::vec k2, arma::vec k3, arma::vec mu1, arma::vec mu2);
RcppExport SEXP _BAMBI_dsin_onex_manypar(SEXP xSEXP, SEXP k1SEXP, SEXP k2SEXP, SEXP k3SEXP, SEXP mu1SEXP, SEXP mu2SEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< arma::vec >::type x(xSEXP);
    Rcpp::traits::input_parameter< arma::vec >::type k1(k1SEXP);
    Rcpp::traits::input_parameter< arma::vec >::type k2(k2SEXP);
    Rcpp::traits::input_parameter< arma::vec >::type k3(k3SEXP);
    Rcpp::traits::input_parameter< arma::vec >::type mu1(mu1SEXP);
    Rcpp::traits::input_parameter< arma::vec >::type mu2(mu2SEXP);
    rcpp_result_gen = Rcpp::wrap(dsin_onex_manypar(x, k1, k2, k3, mu1, mu2));
    return rcpp_result_gen;
END_RCPP
}
// dsin_manyx_onepar
arma::vec dsin_manyx_onepar(arma::mat x, double k1, double k2, double k3, double mu1, double mu2);
RcppExport SEXP _BAMBI_dsin_manyx_onepar(SEXP xSEXP, SEXP k1SEXP, SEXP k2SEXP, SEXP k3SEXP, SEXP mu1SEXP, SEXP mu2SEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< arma::mat >::type x(xSEXP);
    Rcpp::traits::input_parameter< double >::type k1(k1SEXP);
    Rcpp::traits::input_parameter< double >::type k2(k2SEXP);
    Rcpp::traits::input_parameter< double >::type k3(k3SEXP);
    Rcpp::traits::input_parameter< double >::type mu1(mu1SEXP);
    Rcpp::traits::input_parameter< double >::type mu2(mu2SEXP);
    rcpp_result_gen = Rcpp::wrap(dsin_manyx_onepar(x, k1, k2, k3, mu1, mu2));
    return rcpp_result_gen;
END_RCPP
}
// dsin_manyx_manypar
arma::vec dsin_manyx_manypar(arma::mat x, arma::vec k1, arma::vec k2, arma::vec k3, arma::vec mu1, arma::vec mu2);
RcppExport SEXP _BAMBI_dsin_manyx_manypar(SEXP xSEXP, SEXP k1SEXP, SEXP k2SEXP, SEXP k3SEXP, SEXP mu1SEXP, SEXP mu2SEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< arma::mat >::type x(xSEXP);
    Rcpp::traits::input_parameter< arma::vec >::type k1(k1SEXP);
    Rcpp::traits::input_parameter< arma::vec >::type k2(k2SEXP);
    Rcpp::traits::input_parameter< arma::vec >::type k3(k3SEXP);
    Rcpp::traits::input_parameter< arma::vec >::type mu1(mu1SEXP);
    Rcpp::traits::input_parameter< arma::vec >::type mu2(mu2SEXP);
    rcpp_result_gen = Rcpp::wrap(dsin_manyx_manypar(x, k1, k2, k3, mu1, mu2));
    return rcpp_result_gen;
END_RCPP
}
// rsin_unimodal
arma::mat rsin_unimodal(int n, double k1, double k2, double k3, double mu1, double mu2, double kappa_opt, double log_I0_kappa_opt, double logK, double log_const_vmsin);
RcppExport SEXP _BAMBI_rsin_unimodal(SEXP nSEXP, SEXP k1SEXP, SEXP k2SEXP, SEXP k3SEXP, SEXP mu1SEXP, SEXP mu2SEXP, SEXP kappa_optSEXP, SEXP log_I0_kappa_optSEXP, SEXP logKSEXP, SEXP log_const_vmsinSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< int >::type n(nSEXP);
    Rcpp::traits::input_parameter< double >::type k1(k1SEXP);
    Rcpp::traits::input_parameter< double >::type k2(k2SEXP);
    Rcpp::traits::input_parameter< double >::type k3(k3SEXP);
    Rcpp::traits::input_parameter< double >::type mu1(mu1SEXP);
    Rcpp::traits::input_parameter< double >::type mu2(mu2SEXP);
    Rcpp::traits::input_parameter< double >::type kappa_opt(kappa_optSEXP);
    Rcpp::traits::input_parameter< double >::type log_I0_kappa_opt(log_I0_kappa_optSEXP);
    Rcpp::traits::input_parameter< double >::type logK(logKSEXP);
    Rcpp::traits::input_parameter< double >::type log_const_vmsin(log_const_vmsinSEXP);
    rcpp_result_gen = Rcpp::wrap(rsin_unimodal(n, k1, k2, k3, mu1, mu2, kappa_opt, log_I0_kappa_opt, logK, log_const_vmsin));
    return rcpp_result_gen;
END_RCPP
}
// rsin_bimodal
arma::mat rsin_bimodal(int n, double k1, double k2, double k3, double mu1, double mu2, double kappa_opt, double log_I0_kappa_opt, double logK, double log_const_vmsin, double mode_1, double mode_2, double vmpropn, double unifpropn);
RcppExport SEXP _BAMBI_rsin_bimodal(SEXP nSEXP, SEXP k1SEXP, SEXP k2SEXP, SEXP k3SEXP, SEXP mu1SEXP, SEXP mu2SEXP, SEXP kappa_optSEXP, SEXP log_I0_kappa_optSEXP, SEXP logKSEXP, SEXP log_const_vmsinSEXP, SEXP mode_1SEXP, SEXP mode_2SEXP, SEXP vmpropnSEXP, SEXP unifpropnSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< int >::type n(nSEXP);
    Rcpp::traits::input_parameter< double >::type k1(k1SEXP);
    Rcpp::traits::input_parameter< double >::type k2(k2SEXP);
    Rcpp::traits::input_parameter< double >::type k3(k3SEXP);
    Rcpp::traits::input_parameter< double >::type mu1(mu1SEXP);
    Rcpp::traits::input_parameter< double >::type mu2(mu2SEXP);
    Rcpp::traits::input_parameter< double >::type kappa_opt(kappa_optSEXP);
    Rcpp::traits::input_parameter< double >::type log_I0_kappa_opt(log_I0_kappa_optSEXP);
    Rcpp::traits::input_parameter< double >::type logK(logKSEXP);
    Rcpp::traits::input_parameter< double >::type log_const_vmsin(log_const_vmsinSEXP);
    Rcpp::traits::input_parameter< double >::type mode_1(mode_1SEXP);
    Rcpp::traits::input_parameter< double >::type mode_2(mode_2SEXP);
    Rcpp::traits::input_parameter< double >::type vmpropn(vmpropnSEXP);
    Rcpp::traits::input_parameter< double >::type unifpropn(unifpropnSEXP);
    rcpp_result_gen = Rcpp::wrap(rsin_bimodal(n, k1, k2, k3, mu1, mu2, kappa_opt, log_I0_kappa_opt, logK, log_const_vmsin, mode_1, mode_2, vmpropn, unifpropn));
    return rcpp_result_gen;
END_RCPP
}
// rsin_onepar
arma::mat rsin_onepar(int n, double k1, double k2, double k3, double mu1, double mu2, double I_upper_bd);
RcppExport SEXP _BAMBI_rsin_onepar(SEXP nSEXP, SEXP k1SEXP, SEXP k2SEXP, SEXP k3SEXP, SEXP mu1SEXP, SEXP mu2SEXP, SEXP I_upper_bdSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< int >::type n(nSEXP);
    Rcpp::traits::input_parameter< double >::type k1(k1SEXP);
    Rcpp::traits::input_parameter< double >::type k2(k2SEXP);
    Rcpp::traits::input_parameter< double >::type k3(k3SEXP);
    Rcpp::traits::input_parameter< double >::type mu1(mu1SEXP);
    Rcpp::traits::input_parameter< double >::type mu2(mu2SEXP);
    Rcpp::traits::input_parameter< double >::type I_upper_bd(I_upper_bdSEXP);
    rcpp_result_gen = Rcpp::wrap(rsin_onepar(n, k1, k2, k3, mu1, mu2, I_upper_bd));
    return rcpp_result_gen;
END_RCPP
}
// mem_p_sin
arma::mat mem_p_sin(arma::mat data, arma::mat par, arma::vec pi, arma::vec log_c_von, int ncores);
RcppExport SEXP _BAMBI_mem_p_sin(SEXP dataSEXP, SEXP parSEXP, SEXP piSEXP, SEXP log_c_vonSEXP, SEXP ncoresSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< arma::mat >::type data(dataSEXP);
    Rcpp::traits::input_parameter< arma::mat >::type par(parSEXP);
    Rcpp::traits::input_parameter< arma::vec >::type pi(piSEXP);
    Rcpp::traits::input_parameter< arma::vec >::type log_c_von(log_c_vonSEXP);
    Rcpp::traits::input_parameter< int >::type ncores(ncoresSEXP);
    rcpp_result_gen = Rcpp::wrap(mem_p_sin(data, par, pi, log_c_von, ncores));
    return rcpp_result_gen;
END_RCPP
}
// llik_vmsin_contri_C
arma::vec llik_vmsin_contri_C(arma::mat data, arma::mat par, arma::vec pi, arma::vec log_c);
RcppExport SEXP _BAMBI_llik_vmsin_contri_C(SEXP dataSEXP, SEXP parSEXP, SEXP piSEXP, SEXP log_cSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< arma::mat >::type data(dataSEXP);
    Rcpp::traits::input_parameter< arma::mat >::type par(parSEXP);
    Rcpp::traits::input_parameter< arma::vec >::type pi(piSEXP);
    Rcpp::traits::input_parameter< arma::vec >::type log_c(log_cSEXP);
    rcpp_result_gen = Rcpp::wrap(llik_vmsin_contri_C(data, par, pi, log_c));
    return rcpp_result_gen;
END_RCPP
}
// llik_vmsin_one_comp
double llik_vmsin_one_comp(arma::mat data, arma::vec par_vec, double log_c);
RcppExport SEXP _BAMBI_llik_vmsin_one_comp(SEXP dataSEXP, SEXP par_vecSEXP, SEXP log_cSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< arma::mat >::type data(dataSEXP);
    Rcpp::traits::input_parameter< arma::vec >::type par_vec(par_vecSEXP);
    Rcpp::traits::input_parameter< double >::type log_c(log_cSEXP);
    rcpp_result_gen = Rcpp::wrap(llik_vmsin_one_comp(data, par_vec, log_c));
    return rcpp_result_gen;
END_RCPP
}
// grad_llik_vmsin_C
arma::vec grad_llik_vmsin_C(arma::mat data, arma::vec par);
RcppExport SEXP _BAMBI_grad_llik_vmsin_C(SEXP dataSEXP, SEXP parSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< arma::mat >::type data(dataSEXP);
    Rcpp::traits::input_parameter< arma::vec >::type par(parSEXP);
    rcpp_result_gen = Rcpp::wrap(grad_llik_vmsin_C(data, par));
    return rcpp_result_gen;
END_RCPP
}
// vmsin_var_corr_anltc
List vmsin_var_corr_anltc(double k1, double k2, double lambda);
RcppExport SEXP _BAMBI_vmsin_var_corr_anltc(SEXP k1SEXP, SEXP k2SEXP, SEXP lambdaSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< double >::type k1(k1SEXP);
    Rcpp::traits::input_parameter< double >::type k2(k2SEXP);
    Rcpp::traits::input_parameter< double >::type lambda(lambdaSEXP);
    rcpp_result_gen = Rcpp::wrap(vmsin_var_corr_anltc(k1, k2, lambda));
    return rcpp_result_gen;
END_RCPP
}
// vmsin_var_corr_mc
List vmsin_var_corr_mc(double k1, double k2, double k3, arma::mat uni_rand, int ncores);
RcppExport SEXP _BAMBI_vmsin_var_corr_mc(SEXP k1SEXP, SEXP k2SEXP, SEXP k3SEXP, SEXP uni_randSEXP, SEXP ncoresSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< double >::type k1(k1SEXP);
    Rcpp::traits::input_parameter< double >::type k2(k2SEXP);
    Rcpp::traits::input_parameter< double >::type k3(k3SEXP);
    Rcpp::traits::input_parameter< arma::mat >::type uni_rand(uni_randSEXP);
    Rcpp::traits::input_parameter< int >::type ncores(ncoresSEXP);
    rcpp_result_gen = Rcpp::wrap(vmsin_var_corr_mc(k1, k2, k3, uni_rand, ncores));
    return rcpp_result_gen;
END_RCPP
}
// vmsin_var_cor_singlepar_cpp
List vmsin_var_cor_singlepar_cpp(double k1, double k2, double k3, arma::mat uni_rand, int ncores);
RcppExport SEXP _BAMBI_vmsin_var_cor_singlepar_cpp(SEXP k1SEXP, SEXP k2SEXP, SEXP k3SEXP, SEXP uni_randSEXP, SEXP ncoresSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< double >::type k1(k1SEXP);
    Rcpp::traits::input_parameter< double >::type k2(k2SEXP);
    Rcpp::traits::input_parameter< double >::type k3(k3SEXP);
    Rcpp::traits::input_parameter< arma::mat >::type uni_rand(uni_randSEXP);
    Rcpp::traits::input_parameter< int >::type ncores(ncoresSEXP);
    rcpp_result_gen = Rcpp::wrap(vmsin_var_cor_singlepar_cpp(k1, k2, k3, uni_rand, ncores));
    return rcpp_result_gen;
END_RCPP
}
// ldsin_onex_manypar
arma::vec ldsin_onex_manypar(arma::vec x, arma::vec k1, arma::vec k2, arma::vec k3, arma::vec mu1, arma::vec mu2);
RcppExport SEXP _BAMBI_ldsin_onex_manypar(SEXP xSEXP, SEXP k1SEXP, SEXP k2SEXP, SEXP k3SEXP, SEXP mu1SEXP, SEXP mu2SEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< arma::vec >::type x(xSEXP);
    Rcpp::traits::input_parameter< arma::vec >::type k1(k1SEXP);
    Rcpp::traits::input_parameter< arma::vec >::type k2(k2SEXP);
    Rcpp::traits::input_parameter< arma::vec >::type k3(k3SEXP);
    Rcpp::traits::input_parameter< arma::vec >::type mu1(mu1SEXP);
    Rcpp::traits::input_parameter< arma::vec >::type mu2(mu2SEXP);
    rcpp_result_gen = Rcpp::wrap(ldsin_onex_manypar(x, k1, k2, k3, mu1, mu2));
    return rcpp_result_gen;
END_RCPP
}
// ldsin_manyx_onepar
arma::vec ldsin_manyx_onepar(arma::mat x, double k1, double k2, double k3, double mu1, double mu2);
RcppExport SEXP _BAMBI_ldsin_manyx_onepar(SEXP xSEXP, SEXP k1SEXP, SEXP k2SEXP, SEXP k3SEXP, SEXP mu1SEXP, SEXP mu2SEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< arma::mat >::type x(xSEXP);
    Rcpp::traits::input_parameter< double >::type k1(k1SEXP);
    Rcpp::traits::input_parameter< double >::type k2(k2SEXP);
    Rcpp::traits::input_parameter< double >::type k3(k3SEXP);
    Rcpp::traits::input_parameter< double >::type mu1(mu1SEXP);
    Rcpp::traits::input_parameter< double >::type mu2(mu2SEXP);
    rcpp_result_gen = Rcpp::wrap(ldsin_manyx_onepar(x, k1, k2, k3, mu1, mu2));
    return rcpp_result_gen;
END_RCPP
}
// ldsin_manyx_manypar
arma::vec ldsin_manyx_manypar(arma::mat x, arma::vec k1, arma::vec k2, arma::vec k3, arma::vec mu1, arma::vec mu2);
RcppExport SEXP _BAMBI_ldsin_manyx_manypar(SEXP xSEXP, SEXP k1SEXP, SEXP k2SEXP, SEXP k3SEXP, SEXP mu1SEXP, SEXP mu2SEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< arma::mat >::type x(xSEXP);
    Rcpp::traits::input_parameter< arma::vec >::type k1(k1SEXP);
    Rcpp::traits::input_parameter< arma::vec >::type k2(k2SEXP);
    Rcpp::traits::input_parameter< arma::vec >::type k3(k3SEXP);
    Rcpp::traits::input_parameter< arma::vec >::type mu1(mu1SEXP);
    Rcpp::traits::input_parameter< arma::vec >::type mu2(mu2SEXP);
    rcpp_result_gen = Rcpp::wrap(ldsin_manyx_manypar(x, k1, k2, k3, mu1, mu2));
    return rcpp_result_gen;
END_RCPP
}
// ldwnorm2_num
double ldwnorm2_num(Rcpp::NumericVector x, Rcpp::NumericVector par, Rcpp::NumericMatrix omega_2pi);
RcppExport SEXP _BAMBI_ldwnorm2_num(SEXP xSEXP, SEXP parSEXP, SEXP omega_2piSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< Rcpp::NumericVector >::type x(xSEXP);
    Rcpp::traits::input_parameter< Rcpp::NumericVector >::type par(parSEXP);
    Rcpp::traits::input_parameter< Rcpp::NumericMatrix >::type omega_2pi(omega_2piSEXP);
    rcpp_result_gen = Rcpp::wrap(ldwnorm2_num(x, par, omega_2pi));
    return rcpp_result_gen;
END_RCPP
}
// l_const_wnorm2
double l_const_wnorm2(Rcpp::NumericVector par);
RcppExport SEXP _BAMBI_l_const_wnorm2(SEXP parSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< Rcpp::NumericVector >::type par(parSEXP);
    rcpp_result_gen = Rcpp::wrap(l_const_wnorm2(par));
    return rcpp_result_gen;
END_RCPP
}
// const_wnorm2
double const_wnorm2(Rcpp::NumericVector par);
RcppExport SEXP _BAMBI_const_wnorm2(SEXP parSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< Rcpp::NumericVector >::type par(parSEXP);
    rcpp_result_gen = Rcpp::wrap(const_wnorm2(par));
    return rcpp_result_gen;
END_RCPP
}
// log_const_wnorm2_all
Rcpp::NumericVector log_const_wnorm2_all(Rcpp::NumericMatrix par_mat);
RcppExport SEXP _BAMBI_log_const_wnorm2_all(SEXP par_matSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< Rcpp::NumericMatrix >::type par_mat(par_matSEXP);
    rcpp_result_gen = Rcpp::wrap(log_const_wnorm2_all(par_mat));
    return rcpp_result_gen;
END_RCPP
}
// mem_p_wnorm2
Rcpp::NumericMatrix mem_p_wnorm2(Rcpp::NumericMatrix data, Rcpp::NumericMatrix par_mat, Rcpp::NumericVector pi, Rcpp::NumericVector log_c_wnorm, Rcpp::NumericMatrix omega_2pi, int ncores);
RcppExport SEXP _BAMBI_mem_p_wnorm2(SEXP dataSEXP, SEXP par_matSEXP, SEXP piSEXP, SEXP log_c_wnormSEXP, SEXP omega_2piSEXP, SEXP ncoresSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< Rcpp::NumericMatrix >::type data(dataSEXP);
    Rcpp::traits::input_parameter< Rcpp::NumericMatrix >::type par_mat(par_matSEXP);
    Rcpp::traits::input_parameter< Rcpp::NumericVector >::type pi(piSEXP);
    Rcpp::traits::input_parameter< Rcpp::NumericVector >::type log_c_wnorm(log_c_wnormSEXP);
    Rcpp::traits::input_parameter< Rcpp::NumericMatrix >::type omega_2pi(omega_2piSEXP);
    Rcpp::traits::input_parameter< int >::type ncores(ncoresSEXP);
    rcpp_result_gen = Rcpp::wrap(mem_p_wnorm2(data, par_mat, pi, log_c_wnorm, omega_2pi, ncores));
    return rcpp_result_gen;
END_RCPP
}
// llik_wnorm2_contri_C
Rcpp::NumericVector llik_wnorm2_contri_C(Rcpp::NumericMatrix data, Rcpp::NumericMatrix par, Rcpp::NumericVector pi, Rcpp::NumericVector log_c, Rcpp::NumericMatrix omega_2pi);
RcppExport SEXP _BAMBI_llik_wnorm2_contri_C(SEXP dataSEXP, SEXP parSEXP, SEXP piSEXP, SEXP log_cSEXP, SEXP omega_2piSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< Rcpp::NumericMatrix >::type data(dataSEXP);
    Rcpp::traits::input_parameter< Rcpp::NumericMatrix >::type par(parSEXP);
    Rcpp::traits::input_parameter< Rcpp::NumericVector >::type pi(piSEXP);
    Rcpp::traits::input_parameter< Rcpp::NumericVector >::type log_c(log_cSEXP);
    Rcpp::traits::input_parameter< Rcpp::NumericMatrix >::type omega_2pi(omega_2piSEXP);
    rcpp_result_gen = Rcpp::wrap(llik_wnorm2_contri_C(data, par, pi, log_c, omega_2pi));
    return rcpp_result_gen;
END_RCPP
}
// llik_wnorm2_one_comp
double llik_wnorm2_one_comp(Rcpp::NumericMatrix data, Rcpp::NumericVector par_vec, double log_c, Rcpp::NumericMatrix omega_2pi);
RcppExport SEXP _BAMBI_llik_wnorm2_one_comp(SEXP dataSEXP, SEXP par_vecSEXP, SEXP log_cSEXP, SEXP omega_2piSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< Rcpp::NumericMatrix >::type data(dataSEXP);
    Rcpp::traits::input_parameter< Rcpp::NumericVector >::type par_vec(par_vecSEXP);
    Rcpp::traits::input_parameter< double >::type log_c(log_cSEXP);
    Rcpp::traits::input_parameter< Rcpp::NumericMatrix >::type omega_2pi(omega_2piSEXP);
    rcpp_result_gen = Rcpp::wrap(llik_wnorm2_one_comp(data, par_vec, log_c, omega_2pi));
    return rcpp_result_gen;
END_RCPP
}
// grad_llik_wnorm2_C
Rcpp::NumericVector grad_llik_wnorm2_C(Rcpp::NumericMatrix data, Rcpp::NumericVector par, Rcpp::NumericMatrix omega_2pi);
RcppExport SEXP _BAMBI_grad_llik_wnorm2_C(SEXP dataSEXP, SEXP parSEXP, SEXP omega_2piSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< Rcpp::NumericMatrix >::type data(dataSEXP);
    Rcpp::traits::input_parameter< Rcpp::NumericVector >::type par(parSEXP);
    Rcpp::traits::input_parameter< Rcpp::NumericMatrix >::type omega_2pi(omega_2piSEXP);
    rcpp_result_gen = Rcpp::wrap(grad_llik_wnorm2_C(data, par, omega_2pi));
    return rcpp_result_gen;
END_RCPP
}
// grad_den_wnorm2_one_comp_i_unadj
Rcpp::NumericVector grad_den_wnorm2_one_comp_i_unadj(double x, double y, Rcpp::NumericVector par, double det_sig_inv, double det_sig_inv_sqrt, Rcpp::NumericMatrix omega_2pi);
RcppExport SEXP _BAMBI_grad_den_wnorm2_one_comp_i_unadj(SEXP xSEXP, SEXP ySEXP, SEXP parSEXP, SEXP det_sig_invSEXP, SEXP det_sig_inv_sqrtSEXP, SEXP omega_2piSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< double >::type x(xSEXP);
    Rcpp::traits::input_parameter< double >::type y(ySEXP);
    Rcpp::traits::input_parameter< Rcpp::NumericVector >::type par(parSEXP);
    Rcpp::traits::input_parameter< double >::type det_sig_inv(det_sig_invSEXP);
    Rcpp::traits::input_parameter< double >::type det_sig_inv_sqrt(det_sig_inv_sqrtSEXP);
    Rcpp::traits::input_parameter< Rcpp::NumericMatrix >::type omega_2pi(omega_2piSEXP);
    rcpp_result_gen = Rcpp::wrap(grad_den_wnorm2_one_comp_i_unadj(x, y, par, det_sig_inv, det_sig_inv_sqrt, omega_2pi));
    return rcpp_result_gen;
END_RCPP
}
// dwnorm2_onex_manypar
Rcpp::NumericVector dwnorm2_onex_manypar(Rcpp::NumericVector x, Rcpp::NumericVector k1, Rcpp::NumericVector k2, Rcpp::NumericVector k3, Rcpp::NumericVector mu1, Rcpp::NumericVector mu2, Rcpp::NumericMatrix omega_2pi);
RcppExport SEXP _BAMBI_dwnorm2_onex_manypar(SEXP xSEXP, SEXP k1SEXP, SEXP k2SEXP, SEXP k3SEXP, SEXP mu1SEXP, SEXP mu2SEXP, SEXP omega_2piSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< Rcpp::NumericVector >::type x(xSEXP);
    Rcpp::traits::input_parameter< Rcpp::NumericVector >::type k1(k1SEXP);
    Rcpp::traits::input_parameter< Rcpp::NumericVector >::type k2(k2SEXP);
    Rcpp::traits::input_parameter< Rcpp::NumericVector >::type k3(k3SEXP);
    Rcpp::traits::input_parameter< Rcpp::NumericVector >::type mu1(mu1SEXP);
    Rcpp::traits::input_parameter< Rcpp::NumericVector >::type mu2(mu2SEXP);
    Rcpp::traits::input_parameter< Rcpp::NumericMatrix >::type omega_2pi(omega_2piSEXP);
    rcpp_result_gen = Rcpp::wrap(dwnorm2_onex_manypar(x, k1, k2, k3, mu1, mu2, omega_2pi));
    return rcpp_result_gen;
END_RCPP
}
// dwnorm2_manyx_onepar
Rcpp::NumericVector dwnorm2_manyx_onepar(Rcpp::NumericMatrix x, double k1, double k2, double k3, double mu1, double mu2, Rcpp::NumericMatrix omega_2pi);
RcppExport SEXP _BAMBI_dwnorm2_manyx_onepar(SEXP xSEXP, SEXP k1SEXP, SEXP k2SEXP, SEXP k3SEXP, SEXP mu1SEXP, SEXP mu2SEXP, SEXP omega_2piSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< Rcpp::NumericMatrix >::type x(xSEXP);
    Rcpp::traits::input_parameter< double >::type k1(k1SEXP);
    Rcpp::traits::input_parameter< double >::type k2(k2SEXP);
    Rcpp::traits::input_parameter< double >::type k3(k3SEXP);
    Rcpp::traits::input_parameter< double >::type mu1(mu1SEXP);
    Rcpp::traits::input_parameter< double >::type mu2(mu2SEXP);
    Rcpp::traits::input_parameter< Rcpp::NumericMatrix >::type omega_2pi(omega_2piSEXP);
    rcpp_result_gen = Rcpp::wrap(dwnorm2_manyx_onepar(x, k1, k2, k3, mu1, mu2, omega_2pi));
    return rcpp_result_gen;
END_RCPP
}
// dwnorm2_manyx_manypar
Rcpp::NumericVector dwnorm2_manyx_manypar(Rcpp::NumericMatrix x, Rcpp::NumericVector k1, Rcpp::NumericVector k2, Rcpp::NumericVector k3, Rcpp::NumericVector mu1, Rcpp::NumericVector mu2, Rcpp::NumericMatrix omega_2pi);
RcppExport SEXP _BAMBI_dwnorm2_manyx_manypar(SEXP xSEXP, SEXP k1SEXP, SEXP k2SEXP, SEXP k3SEXP, SEXP mu1SEXP, SEXP mu2SEXP, SEXP omega_2piSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< Rcpp::NumericMatrix >::type x(xSEXP);
    Rcpp::traits::input_parameter< Rcpp::NumericVector >::type k1(k1SEXP);
    Rcpp::traits::input_parameter< Rcpp::NumericVector >::type k2(k2SEXP);
    Rcpp::traits::input_parameter< Rcpp::NumericVector >::type k3(k3SEXP);
    Rcpp::traits::input_parameter< Rcpp::NumericVector >::type mu1(mu1SEXP);
    Rcpp::traits::input_parameter< Rcpp::NumericVector >::type mu2(mu2SEXP);
    Rcpp::traits::input_parameter< Rcpp::NumericMatrix >::type omega_2pi(omega_2piSEXP);
    rcpp_result_gen = Rcpp::wrap(dwnorm2_manyx_manypar(x, k1, k2, k3, mu1, mu2, omega_2pi));
    return rcpp_result_gen;
END_RCPP
}

static const R_CallMethodDef CallEntries[] = {
    {"_BAMBI_rowVars", (DL_FUNC) &_BAMBI_rowVars, 1},
    {"_BAMBI_par_mat_permute", (DL_FUNC) &_BAMBI_par_mat_permute, 2},
    {"_BAMBI_cID", (DL_FUNC) &_BAMBI_cID, 3},
    {"_BAMBI_change_labs", (DL_FUNC) &_BAMBI_change_labs, 2},
    {"_BAMBI_calc_corr_tau_2", (DL_FUNC) &_BAMBI_calc_corr_tau_2, 1},
    {"_BAMBI_calc_corr_tau_1", (DL_FUNC) &_BAMBI_calc_corr_tau_1, 1},
    {"_BAMBI_calc_corr_fl", (DL_FUNC) &_BAMBI_calc_corr_fl, 1},
    {"_BAMBI_const_univm", (DL_FUNC) &_BAMBI_const_univm, 1},
    {"_BAMBI_log_const_univm_all", (DL_FUNC) &_BAMBI_log_const_univm_all, 1},
    {"_BAMBI_ldunivmnum", (DL_FUNC) &_BAMBI_ldunivmnum, 2},
    {"_BAMBI_dunivm_manyx_onepar", (DL_FUNC) &_BAMBI_dunivm_manyx_onepar, 3},
    {"_BAMBI_dunivm_manyx_manypar", (DL_FUNC) &_BAMBI_dunivm_manyx_manypar, 3},
    {"_BAMBI_dunivm_onex_manypar", (DL_FUNC) &_BAMBI_dunivm_onex_manypar, 3},
    {"_BAMBI_runivm_onepar", (DL_FUNC) &_BAMBI_runivm_onepar, 3},
    {"_BAMBI_runivm_manypar", (DL_FUNC) &_BAMBI_runivm_manypar, 2},
    {"_BAMBI_univmmix", (DL_FUNC) &_BAMBI_univmmix, 4},
    {"_BAMBI_univmmix_manyx", (DL_FUNC) &_BAMBI_univmmix_manyx, 4},
    {"_BAMBI_mem_p_univm", (DL_FUNC) &_BAMBI_mem_p_univm, 4},
    {"_BAMBI_llik_univm_one_comp", (DL_FUNC) &_BAMBI_llik_univm_one_comp, 3},
    {"_BAMBI_grad_llik_univm_C", (DL_FUNC) &_BAMBI_grad_llik_univm_C, 2},
    {"_BAMBI_llik_univm_contri_C", (DL_FUNC) &_BAMBI_llik_univm_contri_C, 4},
    {"_BAMBI_l_const_uniwnorm", (DL_FUNC) &_BAMBI_l_const_uniwnorm, 1},
    {"_BAMBI_const_uniwnorm", (DL_FUNC) &_BAMBI_const_uniwnorm, 1},
    {"_BAMBI_log_const_uniwnorm_all", (DL_FUNC) &_BAMBI_log_const_uniwnorm_all, 1},
    {"_BAMBI_lduniwnormnum", (DL_FUNC) &_BAMBI_lduniwnormnum, 3},
    {"_BAMBI_duniwnorm_manyx_onepar", (DL_FUNC) &_BAMBI_duniwnorm_manyx_onepar, 4},
    {"_BAMBI_duniwnorm_manyx_manypar", (DL_FUNC) &_BAMBI_duniwnorm_manyx_manypar, 4},
    {"_BAMBI_duniwnorm_onex_manypar", (DL_FUNC) &_BAMBI_duniwnorm_onex_manypar, 4},
    {"_BAMBI_mem_p_uniwnorm", (DL_FUNC) &_BAMBI_mem_p_uniwnorm, 5},
    {"_BAMBI_llik_uniwnorm_contri_C", (DL_FUNC) &_BAMBI_llik_uniwnorm_contri_C, 5},
    {"_BAMBI_llik_uniwnorm_one_comp", (DL_FUNC) &_BAMBI_llik_uniwnorm_one_comp, 4},
    {"_BAMBI_grad_llik_uniwnorm_C", (DL_FUNC) &_BAMBI_grad_llik_uniwnorm_C, 3},
    {"_BAMBI_BESSI0_C", (DL_FUNC) &_BAMBI_BESSI0_C, 1},
    {"_BAMBI_const_vmcos_anltc", (DL_FUNC) &_BAMBI_const_vmcos_anltc, 3},
    {"_BAMBI_const_vmcos_mc", (DL_FUNC) &_BAMBI_const_vmcos_mc, 5},
    {"_BAMBI_const_vmcos", (DL_FUNC) &_BAMBI_const_vmcos, 5},
    {"_BAMBI_d_const_vmcos_anltc", (DL_FUNC) &_BAMBI_d_const_vmcos_anltc, 3},
    {"_BAMBI_d_const_vmcos_mc", (DL_FUNC) &_BAMBI_d_const_vmcos_mc, 5},
    {"_BAMBI_d_const_vmcos", (DL_FUNC) &_BAMBI_d_const_vmcos, 3},
    {"_BAMBI_log_const_vmcos_all", (DL_FUNC) &_BAMBI_log_const_vmcos_all, 2},
    {"_BAMBI_ldcosnum", (DL_FUNC) &_BAMBI_ldcosnum, 3},
    {"_BAMBI_dcos_onex_manypar", (DL_FUNC) &_BAMBI_dcos_onex_manypar, 7},
    {"_BAMBI_dcos_manyx_onepar", (DL_FUNC) &_BAMBI_dcos_manyx_onepar, 7},
    {"_BAMBI_dcos_manyx_manypar", (DL_FUNC) &_BAMBI_dcos_manyx_manypar, 7},
    {"_BAMBI_rcos_unimodal", (DL_FUNC) &_BAMBI_rcos_unimodal, 10},
    {"_BAMBI_rcos_bimodal", (DL_FUNC) &_BAMBI_rcos_bimodal, 14},
    {"_BAMBI_rcos_onepar", (DL_FUNC) &_BAMBI_rcos_onepar, 7},
    {"_BAMBI_mem_p_cos", (DL_FUNC) &_BAMBI_mem_p_cos, 4},
    {"_BAMBI_llik_vmcos_contri_C", (DL_FUNC) &_BAMBI_llik_vmcos_contri_C, 4},
    {"_BAMBI_llik_vmcos_one_comp", (DL_FUNC) &_BAMBI_llik_vmcos_one_comp, 3},
    {"_BAMBI_grad_llik_vmcos_C", (DL_FUNC) &_BAMBI_grad_llik_vmcos_C, 3},
    {"_BAMBI_vmcos_var_corr_anltc", (DL_FUNC) &_BAMBI_vmcos_var_corr_anltc, 3},
    {"_BAMBI_vmcos_var_corr_mc", (DL_FUNC) &_BAMBI_vmcos_var_corr_mc, 5},
    {"_BAMBI_vmcos_var_cor_singlepar_cpp", (DL_FUNC) &_BAMBI_vmcos_var_cor_singlepar_cpp, 5},
    {"_BAMBI_ldcos_onex_manypar", (DL_FUNC) &_BAMBI_ldcos_onex_manypar, 7},
    {"_BAMBI_ldcos_manyx_onepar", (DL_FUNC) &_BAMBI_ldcos_manyx_onepar, 7},
    {"_BAMBI_ldcos_manyx_manypar", (DL_FUNC) &_BAMBI_ldcos_manyx_manypar, 7},
    {"_BAMBI_const_vmsin", (DL_FUNC) &_BAMBI_const_vmsin, 3},
    {"_BAMBI_d_const_vmsin", (DL_FUNC) &_BAMBI_d_const_vmsin, 1},
    {"_BAMBI_log_const_vmsin_all", (DL_FUNC) &_BAMBI_log_const_vmsin_all, 1},
    {"_BAMBI_ldsinnum", (DL_FUNC) &_BAMBI_ldsinnum, 3},
    {"_BAMBI_dsin_onex_manypar", (DL_FUNC) &_BAMBI_dsin_onex_manypar, 6},
    {"_BAMBI_dsin_manyx_onepar", (DL_FUNC) &_BAMBI_dsin_manyx_onepar, 6},
    {"_BAMBI_dsin_manyx_manypar", (DL_FUNC) &_BAMBI_dsin_manyx_manypar, 6},
    {"_BAMBI_rsin_unimodal", (DL_FUNC) &_BAMBI_rsin_unimodal, 10},
    {"_BAMBI_rsin_bimodal", (DL_FUNC) &_BAMBI_rsin_bimodal, 14},
    {"_BAMBI_rsin_onepar", (DL_FUNC) &_BAMBI_rsin_onepar, 7},
    {"_BAMBI_mem_p_sin", (DL_FUNC) &_BAMBI_mem_p_sin, 5},
    {"_BAMBI_llik_vmsin_contri_C", (DL_FUNC) &_BAMBI_llik_vmsin_contri_C, 4},
    {"_BAMBI_llik_vmsin_one_comp", (DL_FUNC) &_BAMBI_llik_vmsin_one_comp, 3},
    {"_BAMBI_grad_llik_vmsin_C", (DL_FUNC) &_BAMBI_grad_llik_vmsin_C, 2},
    {"_BAMBI_vmsin_var_corr_anltc", (DL_FUNC) &_BAMBI_vmsin_var_corr_anltc, 3},
    {"_BAMBI_vmsin_var_corr_mc", (DL_FUNC) &_BAMBI_vmsin_var_corr_mc, 5},
    {"_BAMBI_vmsin_var_cor_singlepar_cpp", (DL_FUNC) &_BAMBI_vmsin_var_cor_singlepar_cpp, 5},
    {"_BAMBI_ldsin_onex_manypar", (DL_FUNC) &_BAMBI_ldsin_onex_manypar, 6},
    {"_BAMBI_ldsin_manyx_onepar", (DL_FUNC) &_BAMBI_ldsin_manyx_onepar, 6},
    {"_BAMBI_ldsin_manyx_manypar", (DL_FUNC) &_BAMBI_ldsin_manyx_manypar, 6},
    {"_BAMBI_ldwnorm2_num", (DL_FUNC) &_BAMBI_ldwnorm2_num, 3},
    {"_BAMBI_l_const_wnorm2", (DL_FUNC) &_BAMBI_l_const_wnorm2, 1},
    {"_BAMBI_const_wnorm2", (DL_FUNC) &_BAMBI_const_wnorm2, 1},
    {"_BAMBI_log_const_wnorm2_all", (DL_FUNC) &_BAMBI_log_const_wnorm2_all, 1},
    {"_BAMBI_mem_p_wnorm2", (DL_FUNC) &_BAMBI_mem_p_wnorm2, 6},
    {"_BAMBI_llik_wnorm2_contri_C", (DL_FUNC) &_BAMBI_llik_wnorm2_contri_C, 5},
    {"_BAMBI_llik_wnorm2_one_comp", (DL_FUNC) &_BAMBI_llik_wnorm2_one_comp, 4},
    {"_BAMBI_grad_llik_wnorm2_C", (DL_FUNC) &_BAMBI_grad_llik_wnorm2_C, 3},
    {"_BAMBI_grad_den_wnorm2_one_comp_i_unadj", (DL_FUNC) &_BAMBI_grad_den_wnorm2_one_comp_i_unadj, 6},
    {"_BAMBI_dwnorm2_onex_manypar", (DL_FUNC) &_BAMBI_dwnorm2_onex_manypar, 7},
    {"_BAMBI_dwnorm2_manyx_onepar", (DL_FUNC) &_BAMBI_dwnorm2_manyx_onepar, 7},
    {"_BAMBI_dwnorm2_manyx_manypar", (DL_FUNC) &_BAMBI_dwnorm2_manyx_manypar, 7},
    {NULL, NULL, 0}
};

RcppExport void R_init_BAMBI(DllInfo *dll) {
    R_registerRoutines(dll, NULL, CallEntries, NULL, NULL);
    R_useDynamicSymbols(dll, FALSE);
}
