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

// findGroup
arma::field<arma::vec> findGroup(NumericMatrix z, NumericMatrix groups, const int adj);
RcppExport SEXP _switchSelection_findGroup(SEXP zSEXP, SEXP groupsSEXP, SEXP adjSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::traits::input_parameter< NumericMatrix >::type z(zSEXP);
    Rcpp::traits::input_parameter< NumericMatrix >::type groups(groupsSEXP);
    Rcpp::traits::input_parameter< const int >::type adj(adjSEXP);
    rcpp_result_gen = Rcpp::wrap(findGroup(z, groups, adj));
    return rcpp_result_gen;
END_RCPP
}
// matrixInMatrix
LogicalVector matrixInMatrix(NumericMatrix x, NumericMatrix y);
RcppExport SEXP _switchSelection_matrixInMatrix(SEXP xSEXP, SEXP ySEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::traits::input_parameter< NumericMatrix >::type x(xSEXP);
    Rcpp::traits::input_parameter< NumericMatrix >::type y(ySEXP);
    rcpp_result_gen = Rcpp::wrap(matrixInMatrix(x, y));
    return rcpp_result_gen;
END_RCPP
}
// lnL_msel
NumericMatrix lnL_msel(const arma::vec par, const List control_lnL, const String out_type, const int n_sim, const int n_cores, const Nullable<List> regularization);
RcppExport SEXP _switchSelection_lnL_msel(SEXP parSEXP, SEXP control_lnLSEXP, SEXP out_typeSEXP, SEXP n_simSEXP, SEXP n_coresSEXP, SEXP regularizationSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::traits::input_parameter< const arma::vec >::type par(parSEXP);
    Rcpp::traits::input_parameter< const List >::type control_lnL(control_lnLSEXP);
    Rcpp::traits::input_parameter< const String >::type out_type(out_typeSEXP);
    Rcpp::traits::input_parameter< const int >::type n_sim(n_simSEXP);
    Rcpp::traits::input_parameter< const int >::type n_cores(n_coresSEXP);
    Rcpp::traits::input_parameter< const Nullable<List> >::type regularization(regularizationSEXP);
    rcpp_result_gen = Rcpp::wrap(lnL_msel(par, control_lnL, out_type, n_sim, n_cores, regularization));
    return rcpp_result_gen;
END_RCPP
}
// grad_msel
NumericMatrix grad_msel(const arma::vec par, const List control_lnL, const String out_type, const int n_sim, const int n_cores, const Nullable<List> regularization);
RcppExport SEXP _switchSelection_grad_msel(SEXP parSEXP, SEXP control_lnLSEXP, SEXP out_typeSEXP, SEXP n_simSEXP, SEXP n_coresSEXP, SEXP regularizationSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::traits::input_parameter< const arma::vec >::type par(parSEXP);
    Rcpp::traits::input_parameter< const List >::type control_lnL(control_lnLSEXP);
    Rcpp::traits::input_parameter< const String >::type out_type(out_typeSEXP);
    Rcpp::traits::input_parameter< const int >::type n_sim(n_simSEXP);
    Rcpp::traits::input_parameter< const int >::type n_cores(n_coresSEXP);
    Rcpp::traits::input_parameter< const Nullable<List> >::type regularization(regularizationSEXP);
    rcpp_result_gen = Rcpp::wrap(grad_msel(par, control_lnL, out_type, n_sim, n_cores, regularization));
    return rcpp_result_gen;
END_RCPP
}

static const R_CallMethodDef CallEntries[] = {
    {"_switchSelection_findGroup", (DL_FUNC) &_switchSelection_findGroup, 3},
    {"_switchSelection_matrixInMatrix", (DL_FUNC) &_switchSelection_matrixInMatrix, 2},
    {"_switchSelection_lnL_msel", (DL_FUNC) &_switchSelection_lnL_msel, 6},
    {"_switchSelection_grad_msel", (DL_FUNC) &_switchSelection_grad_msel, 6},
    {NULL, NULL, 0}
};

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