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

// SA
arma::mat SA(const arma::mat& ocData, const double& we, const int& totalit, bool runadamW, bool sparse, const double& lambda, const int& intv, const double& maxlearningrate, const double& warmup_tt);
RcppExport SEXP _ELAplus_SA(SEXP ocDataSEXP, SEXP weSEXP, SEXP totalitSEXP, SEXP runadamWSEXP, SEXP sparseSEXP, SEXP lambdaSEXP, SEXP intvSEXP, SEXP maxlearningrateSEXP, SEXP warmup_ttSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< const arma::mat& >::type ocData(ocDataSEXP);
    Rcpp::traits::input_parameter< const double& >::type we(weSEXP);
    Rcpp::traits::input_parameter< const int& >::type totalit(totalitSEXP);
    Rcpp::traits::input_parameter< bool >::type runadamW(runadamWSEXP);
    Rcpp::traits::input_parameter< bool >::type sparse(sparseSEXP);
    Rcpp::traits::input_parameter< const double& >::type lambda(lambdaSEXP);
    Rcpp::traits::input_parameter< const int& >::type intv(intvSEXP);
    Rcpp::traits::input_parameter< const double& >::type maxlearningrate(maxlearningrateSEXP);
    Rcpp::traits::input_parameter< const double& >::type warmup_tt(warmup_ttSEXP);
    rcpp_result_gen = Rcpp::wrap(SA(ocData, we, totalit, runadamW, sparse, lambda, intv, maxlearningrate, warmup_tt));
    return rcpp_result_gen;
END_RCPP
}
// fullSA
arma::mat fullSA(const arma::mat& ocData, const arma::mat& envData, bool runadamW, bool sparse, const double& we, const int& totalit, const double& lambda, const int& intv, const double& maxlearningrate, const double& warmup_tt);
RcppExport SEXP _ELAplus_fullSA(SEXP ocDataSEXP, SEXP envDataSEXP, SEXP runadamWSEXP, SEXP sparseSEXP, SEXP weSEXP, SEXP totalitSEXP, SEXP lambdaSEXP, SEXP intvSEXP, SEXP maxlearningrateSEXP, SEXP warmup_ttSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< const arma::mat& >::type ocData(ocDataSEXP);
    Rcpp::traits::input_parameter< const arma::mat& >::type envData(envDataSEXP);
    Rcpp::traits::input_parameter< bool >::type runadamW(runadamWSEXP);
    Rcpp::traits::input_parameter< bool >::type sparse(sparseSEXP);
    Rcpp::traits::input_parameter< const double& >::type we(weSEXP);
    Rcpp::traits::input_parameter< const int& >::type totalit(totalitSEXP);
    Rcpp::traits::input_parameter< const double& >::type lambda(lambdaSEXP);
    Rcpp::traits::input_parameter< const int& >::type intv(intvSEXP);
    Rcpp::traits::input_parameter< const double& >::type maxlearningrate(maxlearningrateSEXP);
    Rcpp::traits::input_parameter< const double& >::type warmup_tt(warmup_ttSEXP);
    rcpp_result_gen = Rcpp::wrap(fullSA(ocData, envData, runadamW, sparse, we, totalit, lambda, intv, maxlearningrate, warmup_tt));
    return rcpp_result_gen;
END_RCPP
}
// cEnergy
inline double cEnergy(const arma::rowvec& state, const arma::rowvec& alpha, const arma::mat& beta);
RcppExport SEXP _ELAplus_cEnergy(SEXP stateSEXP, SEXP alphaSEXP, SEXP betaSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< const arma::rowvec& >::type state(stateSEXP);
    Rcpp::traits::input_parameter< const arma::rowvec& >::type alpha(alphaSEXP);
    Rcpp::traits::input_parameter< const arma::mat& >::type beta(betaSEXP);
    rcpp_result_gen = Rcpp::wrap(cEnergy(state, alpha, beta));
    return rcpp_result_gen;
END_RCPP
}
// SteepestDescent_cpp
arma::mat SteepestDescent_cpp(arma::rowvec state, arma::rowvec alpha, arma::mat beta);
RcppExport SEXP _ELAplus_SteepestDescent_cpp(SEXP stateSEXP, SEXP alphaSEXP, SEXP betaSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< arma::rowvec >::type state(stateSEXP);
    Rcpp::traits::input_parameter< arma::rowvec >::type alpha(alphaSEXP);
    Rcpp::traits::input_parameter< arma::mat >::type beta(betaSEXP);
    rcpp_result_gen = Rcpp::wrap(SteepestDescent_cpp(state, alpha, beta));
    return rcpp_result_gen;
END_RCPP
}
// SSestimate
arma::mat SSestimate(arma::rowvec alpha, arma::mat beta, int itr);
RcppExport SEXP _ELAplus_SSestimate(SEXP alphaSEXP, SEXP betaSEXP, SEXP itrSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< arma::rowvec >::type alpha(alphaSEXP);
    Rcpp::traits::input_parameter< arma::mat >::type beta(betaSEXP);
    Rcpp::traits::input_parameter< int >::type itr(itrSEXP);
    rcpp_result_gen = Rcpp::wrap(SSestimate(alpha, beta, itr));
    return rcpp_result_gen;
END_RCPP
}
// FindingTippingpoint_cpp
arma::rowvec FindingTippingpoint_cpp(arma::rowvec s1, arma:: rowvec s2, arma::rowvec alpha, arma::mat jj, int tmax);
RcppExport SEXP _ELAplus_FindingTippingpoint_cpp(SEXP s1SEXP, SEXP s2SEXP, SEXP alphaSEXP, SEXP jjSEXP, SEXP tmaxSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< arma::rowvec >::type s1(s1SEXP);
    Rcpp::traits::input_parameter< arma:: rowvec >::type s2(s2SEXP);
    Rcpp::traits::input_parameter< arma::rowvec >::type alpha(alphaSEXP);
    Rcpp::traits::input_parameter< arma::mat >::type jj(jjSEXP);
    Rcpp::traits::input_parameter< int >::type tmax(tmaxSEXP);
    rcpp_result_gen = Rcpp::wrap(FindingTippingpoint_cpp(s1, s2, alpha, jj, tmax));
    return rcpp_result_gen;
END_RCPP
}
// TPestimate
arma::mat TPestimate(const arma::mat& comb, arma::mat minset, arma::rowvec alpha, arma::mat beta, const int& tmax);
RcppExport SEXP _ELAplus_TPestimate(SEXP combSEXP, SEXP minsetSEXP, SEXP alphaSEXP, SEXP betaSEXP, SEXP tmaxSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< const arma::mat& >::type comb(combSEXP);
    Rcpp::traits::input_parameter< arma::mat >::type minset(minsetSEXP);
    Rcpp::traits::input_parameter< arma::rowvec >::type alpha(alphaSEXP);
    Rcpp::traits::input_parameter< arma::mat >::type beta(betaSEXP);
    Rcpp::traits::input_parameter< const int& >::type tmax(tmaxSEXP);
    rcpp_result_gen = Rcpp::wrap(TPestimate(comb, minset, alpha, beta, tmax));
    return rcpp_result_gen;
END_RCPP
}
// SSentropy_cpp
arma::mat SSentropy_cpp(arma::mat uoc, arma::mat ss, arma::rowvec alpha, arma::mat beta, int seitr, int convTime);
RcppExport SEXP _ELAplus_SSentropy_cpp(SEXP uocSEXP, SEXP ssSEXP, SEXP alphaSEXP, SEXP betaSEXP, SEXP seitrSEXP, SEXP convTimeSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< arma::mat >::type uoc(uocSEXP);
    Rcpp::traits::input_parameter< arma::mat >::type ss(ssSEXP);
    Rcpp::traits::input_parameter< arma::rowvec >::type alpha(alphaSEXP);
    Rcpp::traits::input_parameter< arma::mat >::type beta(betaSEXP);
    Rcpp::traits::input_parameter< int >::type seitr(seitrSEXP);
    Rcpp::traits::input_parameter< int >::type convTime(convTimeSEXP);
    rcpp_result_gen = Rcpp::wrap(SSentropy_cpp(uoc, ss, alpha, beta, seitr, convTime));
    return rcpp_result_gen;
END_RCPP
}

static const R_CallMethodDef CallEntries[] = {
    {"_ELAplus_SA", (DL_FUNC) &_ELAplus_SA, 9},
    {"_ELAplus_fullSA", (DL_FUNC) &_ELAplus_fullSA, 10},
    {"_ELAplus_cEnergy", (DL_FUNC) &_ELAplus_cEnergy, 3},
    {"_ELAplus_SteepestDescent_cpp", (DL_FUNC) &_ELAplus_SteepestDescent_cpp, 3},
    {"_ELAplus_SSestimate", (DL_FUNC) &_ELAplus_SSestimate, 3},
    {"_ELAplus_FindingTippingpoint_cpp", (DL_FUNC) &_ELAplus_FindingTippingpoint_cpp, 5},
    {"_ELAplus_TPestimate", (DL_FUNC) &_ELAplus_TPestimate, 5},
    {"_ELAplus_SSentropy_cpp", (DL_FUNC) &_ELAplus_SSentropy_cpp, 6},
    {NULL, NULL, 0}
};

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