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

// rcpp_RAMmult
List rcpp_RAMmult(NumericVector par, NumericMatrix A, NumericMatrix S, LogicalMatrix S_fixed, LogicalMatrix A_fixed, NumericMatrix A_est, NumericMatrix S_est, IntegerMatrix F, IntegerMatrix I);
RcppExport SEXP _regsem_rcpp_RAMmult(SEXP parSEXP, SEXP ASEXP, SEXP SSEXP, SEXP S_fixedSEXP, SEXP A_fixedSEXP, SEXP A_estSEXP, SEXP S_estSEXP, SEXP FSEXP, SEXP ISEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< NumericVector >::type par(parSEXP);
    Rcpp::traits::input_parameter< NumericMatrix >::type A(ASEXP);
    Rcpp::traits::input_parameter< NumericMatrix >::type S(SSEXP);
    Rcpp::traits::input_parameter< LogicalMatrix >::type S_fixed(S_fixedSEXP);
    Rcpp::traits::input_parameter< LogicalMatrix >::type A_fixed(A_fixedSEXP);
    Rcpp::traits::input_parameter< NumericMatrix >::type A_est(A_estSEXP);
    Rcpp::traits::input_parameter< NumericMatrix >::type S_est(S_estSEXP);
    Rcpp::traits::input_parameter< IntegerMatrix >::type F(FSEXP);
    Rcpp::traits::input_parameter< IntegerMatrix >::type I(ISEXP);
    rcpp_result_gen = Rcpp::wrap(rcpp_RAMmult(par, A, S, S_fixed, A_fixed, A_est, S_est, F, I));
    return rcpp_result_gen;
END_RCPP
}
// rcpp_fit_fun
double rcpp_fit_fun(Rcpp::NumericMatrix ImpCov, Rcpp::NumericMatrix SampCov, int type2, double lambda, double gamma, arma::vec pen_vec, arma::vec pen_diff, double e_alpha, double rlasso_pen, arma::vec pen_vec1, arma::vec pen_vec2, double dual_pen1, double dual_pen2);
RcppExport SEXP _regsem_rcpp_fit_fun(SEXP ImpCovSEXP, SEXP SampCovSEXP, SEXP type2SEXP, SEXP lambdaSEXP, SEXP gammaSEXP, SEXP pen_vecSEXP, SEXP pen_diffSEXP, SEXP e_alphaSEXP, SEXP rlasso_penSEXP, SEXP pen_vec1SEXP, SEXP pen_vec2SEXP, SEXP dual_pen1SEXP, SEXP dual_pen2SEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< Rcpp::NumericMatrix >::type ImpCov(ImpCovSEXP);
    Rcpp::traits::input_parameter< Rcpp::NumericMatrix >::type SampCov(SampCovSEXP);
    Rcpp::traits::input_parameter< int >::type type2(type2SEXP);
    Rcpp::traits::input_parameter< double >::type lambda(lambdaSEXP);
    Rcpp::traits::input_parameter< double >::type gamma(gammaSEXP);
    Rcpp::traits::input_parameter< arma::vec >::type pen_vec(pen_vecSEXP);
    Rcpp::traits::input_parameter< arma::vec >::type pen_diff(pen_diffSEXP);
    Rcpp::traits::input_parameter< double >::type e_alpha(e_alphaSEXP);
    Rcpp::traits::input_parameter< double >::type rlasso_pen(rlasso_penSEXP);
    Rcpp::traits::input_parameter< arma::vec >::type pen_vec1(pen_vec1SEXP);
    Rcpp::traits::input_parameter< arma::vec >::type pen_vec2(pen_vec2SEXP);
    Rcpp::traits::input_parameter< double >::type dual_pen1(dual_pen1SEXP);
    Rcpp::traits::input_parameter< double >::type dual_pen2(dual_pen2SEXP);
    rcpp_result_gen = Rcpp::wrap(rcpp_fit_fun(ImpCov, SampCov, type2, lambda, gamma, pen_vec, pen_diff, e_alpha, rlasso_pen, pen_vec1, pen_vec2, dual_pen1, dual_pen2));
    return rcpp_result_gen;
END_RCPP
}
// rcpp_grad_ram
arma::vec rcpp_grad_ram(arma::vec par, arma::mat ImpCov, arma::mat SampCov, arma::mat Areg, arma::mat Sreg, arma::mat A, arma::mat S, arma::mat F, double lambda, int type2, arma::vec pen_vec, arma::vec diff_par);
RcppExport SEXP _regsem_rcpp_grad_ram(SEXP parSEXP, SEXP ImpCovSEXP, SEXP SampCovSEXP, SEXP AregSEXP, SEXP SregSEXP, SEXP ASEXP, SEXP SSEXP, SEXP FSEXP, SEXP lambdaSEXP, SEXP type2SEXP, SEXP pen_vecSEXP, SEXP diff_parSEXP) {
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 ImpCov(ImpCovSEXP);
    Rcpp::traits::input_parameter< arma::mat >::type SampCov(SampCovSEXP);
    Rcpp::traits::input_parameter< arma::mat >::type Areg(AregSEXP);
    Rcpp::traits::input_parameter< arma::mat >::type Sreg(SregSEXP);
    Rcpp::traits::input_parameter< arma::mat >::type A(ASEXP);
    Rcpp::traits::input_parameter< arma::mat >::type S(SSEXP);
    Rcpp::traits::input_parameter< arma::mat >::type F(FSEXP);
    Rcpp::traits::input_parameter< double >::type lambda(lambdaSEXP);
    Rcpp::traits::input_parameter< int >::type type2(type2SEXP);
    Rcpp::traits::input_parameter< arma::vec >::type pen_vec(pen_vecSEXP);
    Rcpp::traits::input_parameter< arma::vec >::type diff_par(diff_parSEXP);
    rcpp_result_gen = Rcpp::wrap(rcpp_grad_ram(par, ImpCov, SampCov, Areg, Sreg, A, S, F, lambda, type2, pen_vec, diff_par));
    return rcpp_result_gen;
END_RCPP
}
// rcpp_quasi_calc
List rcpp_quasi_calc(NumericMatrix I, NumericVector s, NumericVector y, NumericMatrix H);
RcppExport SEXP _regsem_rcpp_quasi_calc(SEXP ISEXP, SEXP sSEXP, SEXP ySEXP, SEXP HSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< NumericMatrix >::type I(ISEXP);
    Rcpp::traits::input_parameter< NumericVector >::type s(sSEXP);
    Rcpp::traits::input_parameter< NumericVector >::type y(ySEXP);
    Rcpp::traits::input_parameter< NumericMatrix >::type H(HSEXP);
    rcpp_result_gen = Rcpp::wrap(rcpp_quasi_calc(I, s, y, H));
    return rcpp_result_gen;
END_RCPP
}

static const R_CallMethodDef CallEntries[] = {
    {"_regsem_rcpp_RAMmult", (DL_FUNC) &_regsem_rcpp_RAMmult, 9},
    {"_regsem_rcpp_fit_fun", (DL_FUNC) &_regsem_rcpp_fit_fun, 13},
    {"_regsem_rcpp_grad_ram", (DL_FUNC) &_regsem_rcpp_grad_ram, 12},
    {"_regsem_rcpp_quasi_calc", (DL_FUNC) &_regsem_rcpp_quasi_calc, 4},
    {NULL, NULL, 0}
};

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