// 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

// em_theta
List em_theta(const arma::mat X, const arma::rowvec Y, const int maxiter, const double minvalue, const double conv);
RcppExport SEXP _bambu_em_theta(SEXP XSEXP, SEXP YSEXP, SEXP maxiterSEXP, SEXP minvalueSEXP, SEXP convSEXP) {
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 arma::rowvec >::type Y(YSEXP);
    Rcpp::traits::input_parameter< const int >::type maxiter(maxiterSEXP);
    Rcpp::traits::input_parameter< const double >::type minvalue(minvalueSEXP);
    Rcpp::traits::input_parameter< const double >::type conv(convSEXP);
    rcpp_result_gen = Rcpp::wrap(em_theta(X, Y, maxiter, minvalue, conv));
    return rcpp_result_gen;
END_RCPP
}
// emWithL1
List emWithL1(const arma::mat A, const arma::mat A_full, const arma::mat A_unique, const arma::rowvec Y, const arma::rowvec K, const int maxiter, const double minvalue, const double conv);
RcppExport SEXP _bambu_emWithL1(SEXP ASEXP, SEXP A_fullSEXP, SEXP A_uniqueSEXP, SEXP YSEXP, SEXP KSEXP, SEXP maxiterSEXP, SEXP minvalueSEXP, SEXP convSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< const arma::mat >::type A(ASEXP);
    Rcpp::traits::input_parameter< const arma::mat >::type A_full(A_fullSEXP);
    Rcpp::traits::input_parameter< const arma::mat >::type A_unique(A_uniqueSEXP);
    Rcpp::traits::input_parameter< const arma::rowvec >::type Y(YSEXP);
    Rcpp::traits::input_parameter< const arma::rowvec >::type K(KSEXP);
    Rcpp::traits::input_parameter< const int >::type maxiter(maxiterSEXP);
    Rcpp::traits::input_parameter< const double >::type minvalue(minvalueSEXP);
    Rcpp::traits::input_parameter< const double >::type conv(convSEXP);
    rcpp_result_gen = Rcpp::wrap(emWithL1(A, A_full, A_unique, Y, K, maxiter, minvalue, conv));
    return rcpp_result_gen;
END_RCPP
}

static const R_CallMethodDef CallEntries[] = {
    {"_bambu_em_theta", (DL_FUNC) &_bambu_em_theta, 5},
    {"_bambu_emWithL1", (DL_FUNC) &_bambu_emWithL1, 8},
    {NULL, NULL, 0}
};

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