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

#include <RcppArmadillo.h>
#include <RcppEigen.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

// fitGeneticPLGlmm
List fitGeneticPLGlmm(const arma::mat& Z, const arma::mat& X, const arma::mat& K, arma::vec muvec, arma::vec offsets, arma::vec curr_beta, arma::vec curr_theta, arma::vec curr_u, arma::vec curr_sigma, arma::mat curr_G, const arma::vec& y, List u_indices, double theta_conv, const List& rlevels, double curr_disp, const bool& REML, const int& maxit, std::string solver, std::string vardist);
RcppExport SEXP _miloR_fitGeneticPLGlmm(SEXP ZSEXP, SEXP XSEXP, SEXP KSEXP, SEXP muvecSEXP, SEXP offsetsSEXP, SEXP curr_betaSEXP, SEXP curr_thetaSEXP, SEXP curr_uSEXP, SEXP curr_sigmaSEXP, SEXP curr_GSEXP, SEXP ySEXP, SEXP u_indicesSEXP, SEXP theta_convSEXP, SEXP rlevelsSEXP, SEXP curr_dispSEXP, SEXP REMLSEXP, SEXP maxitSEXP, SEXP solverSEXP, SEXP vardistSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< const arma::mat& >::type Z(ZSEXP);
    Rcpp::traits::input_parameter< const arma::mat& >::type X(XSEXP);
    Rcpp::traits::input_parameter< const arma::mat& >::type K(KSEXP);
    Rcpp::traits::input_parameter< arma::vec >::type muvec(muvecSEXP);
    Rcpp::traits::input_parameter< arma::vec >::type offsets(offsetsSEXP);
    Rcpp::traits::input_parameter< arma::vec >::type curr_beta(curr_betaSEXP);
    Rcpp::traits::input_parameter< arma::vec >::type curr_theta(curr_thetaSEXP);
    Rcpp::traits::input_parameter< arma::vec >::type curr_u(curr_uSEXP);
    Rcpp::traits::input_parameter< arma::vec >::type curr_sigma(curr_sigmaSEXP);
    Rcpp::traits::input_parameter< arma::mat >::type curr_G(curr_GSEXP);
    Rcpp::traits::input_parameter< const arma::vec& >::type y(ySEXP);
    Rcpp::traits::input_parameter< List >::type u_indices(u_indicesSEXP);
    Rcpp::traits::input_parameter< double >::type theta_conv(theta_convSEXP);
    Rcpp::traits::input_parameter< const List& >::type rlevels(rlevelsSEXP);
    Rcpp::traits::input_parameter< double >::type curr_disp(curr_dispSEXP);
    Rcpp::traits::input_parameter< const bool& >::type REML(REMLSEXP);
    Rcpp::traits::input_parameter< const int& >::type maxit(maxitSEXP);
    Rcpp::traits::input_parameter< std::string >::type solver(solverSEXP);
    Rcpp::traits::input_parameter< std::string >::type vardist(vardistSEXP);
    rcpp_result_gen = Rcpp::wrap(fitGeneticPLGlmm(Z, X, K, muvec, offsets, curr_beta, curr_theta, curr_u, curr_sigma, curr_G, y, u_indices, theta_conv, rlevels, curr_disp, REML, maxit, solver, vardist));
    return rcpp_result_gen;
END_RCPP
}
// fitPLGlmm
List fitPLGlmm(const arma::mat& Z, const arma::mat& X, arma::vec muvec, arma::vec offsets, arma::vec curr_beta, arma::vec curr_theta, arma::vec curr_u, arma::vec curr_sigma, arma::mat curr_G, const arma::vec& y, List u_indices, double theta_conv, const List& rlevels, double curr_disp, const bool& REML, const int& maxit, std::string solver, std::string vardist);
RcppExport SEXP _miloR_fitPLGlmm(SEXP ZSEXP, SEXP XSEXP, SEXP muvecSEXP, SEXP offsetsSEXP, SEXP curr_betaSEXP, SEXP curr_thetaSEXP, SEXP curr_uSEXP, SEXP curr_sigmaSEXP, SEXP curr_GSEXP, SEXP ySEXP, SEXP u_indicesSEXP, SEXP theta_convSEXP, SEXP rlevelsSEXP, SEXP curr_dispSEXP, SEXP REMLSEXP, SEXP maxitSEXP, SEXP solverSEXP, SEXP vardistSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< const arma::mat& >::type Z(ZSEXP);
    Rcpp::traits::input_parameter< const arma::mat& >::type X(XSEXP);
    Rcpp::traits::input_parameter< arma::vec >::type muvec(muvecSEXP);
    Rcpp::traits::input_parameter< arma::vec >::type offsets(offsetsSEXP);
    Rcpp::traits::input_parameter< arma::vec >::type curr_beta(curr_betaSEXP);
    Rcpp::traits::input_parameter< arma::vec >::type curr_theta(curr_thetaSEXP);
    Rcpp::traits::input_parameter< arma::vec >::type curr_u(curr_uSEXP);
    Rcpp::traits::input_parameter< arma::vec >::type curr_sigma(curr_sigmaSEXP);
    Rcpp::traits::input_parameter< arma::mat >::type curr_G(curr_GSEXP);
    Rcpp::traits::input_parameter< const arma::vec& >::type y(ySEXP);
    Rcpp::traits::input_parameter< List >::type u_indices(u_indicesSEXP);
    Rcpp::traits::input_parameter< double >::type theta_conv(theta_convSEXP);
    Rcpp::traits::input_parameter< const List& >::type rlevels(rlevelsSEXP);
    Rcpp::traits::input_parameter< double >::type curr_disp(curr_dispSEXP);
    Rcpp::traits::input_parameter< const bool& >::type REML(REMLSEXP);
    Rcpp::traits::input_parameter< const int& >::type maxit(maxitSEXP);
    Rcpp::traits::input_parameter< std::string >::type solver(solverSEXP);
    Rcpp::traits::input_parameter< std::string >::type vardist(vardistSEXP);
    rcpp_result_gen = Rcpp::wrap(fitPLGlmm(Z, X, muvec, offsets, curr_beta, curr_theta, curr_u, curr_sigma, curr_G, y, u_indices, theta_conv, rlevels, curr_disp, REML, maxit, solver, vardist));
    return rcpp_result_gen;
END_RCPP
}

static const R_CallMethodDef CallEntries[] = {
    {"_miloR_fitGeneticPLGlmm", (DL_FUNC) &_miloR_fitGeneticPLGlmm, 19},
    {"_miloR_fitPLGlmm", (DL_FUNC) &_miloR_fitPLGlmm, 18},
    {NULL, NULL, 0}
};

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