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

// compute_kernel_cpp
arma::mat compute_kernel_cpp(arma::mat x1, arma::mat x2, arma::vec theta, std::string type);
RcppExport SEXP _GEMSS_compute_kernel_cpp(SEXP x1SEXP, SEXP x2SEXP, SEXP thetaSEXP, SEXP typeSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< arma::mat >::type x1(x1SEXP);
    Rcpp::traits::input_parameter< arma::mat >::type x2(x2SEXP);
    Rcpp::traits::input_parameter< arma::vec >::type theta(thetaSEXP);
    Rcpp::traits::input_parameter< std::string >::type type(typeSEXP);
    rcpp_result_gen = Rcpp::wrap(compute_kernel_cpp(x1, x2, theta, type));
    return rcpp_result_gen;
END_RCPP
}
// gp_predict_cpp
Rcpp::List gp_predict_cpp(arma::mat X_new, arma::mat X, arma::vec Y, std::string Cov_fun, Rcpp::List Parameters);
RcppExport SEXP _GEMSS_gp_predict_cpp(SEXP X_newSEXP, SEXP XSEXP, SEXP YSEXP, SEXP Cov_funSEXP, SEXP ParametersSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< arma::mat >::type X_new(X_newSEXP);
    Rcpp::traits::input_parameter< arma::mat >::type X(XSEXP);
    Rcpp::traits::input_parameter< arma::vec >::type Y(YSEXP);
    Rcpp::traits::input_parameter< std::string >::type Cov_fun(Cov_funSEXP);
    Rcpp::traits::input_parameter< Rcpp::List >::type Parameters(ParametersSEXP);
    rcpp_result_gen = Rcpp::wrap(gp_predict_cpp(X_new, X, Y, Cov_fun, Parameters));
    return rcpp_result_gen;
END_RCPP
}
// GEMSS_cpp_update_sig
Rcpp::List GEMSS_cpp_update_sig(const arma::mat& X, const arma::vec& Y, const arma::mat& X_val, const arma::vec& Y_val, const arma::uvec& initial_idx, arma::uword ns, double c1, arma::uword n_srs, arma::uword n_top, const arma::vec& theta, double nugget, double beta0, const std::string& Cov_fun, bool print_result);
RcppExport SEXP _GEMSS_GEMSS_cpp_update_sig(SEXP XSEXP, SEXP YSEXP, SEXP X_valSEXP, SEXP Y_valSEXP, SEXP initial_idxSEXP, SEXP nsSEXP, SEXP c1SEXP, SEXP n_srsSEXP, SEXP n_topSEXP, SEXP thetaSEXP, SEXP nuggetSEXP, SEXP beta0SEXP, SEXP Cov_funSEXP, SEXP print_resultSEXP) {
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::vec& >::type Y(YSEXP);
    Rcpp::traits::input_parameter< const arma::mat& >::type X_val(X_valSEXP);
    Rcpp::traits::input_parameter< const arma::vec& >::type Y_val(Y_valSEXP);
    Rcpp::traits::input_parameter< const arma::uvec& >::type initial_idx(initial_idxSEXP);
    Rcpp::traits::input_parameter< arma::uword >::type ns(nsSEXP);
    Rcpp::traits::input_parameter< double >::type c1(c1SEXP);
    Rcpp::traits::input_parameter< arma::uword >::type n_srs(n_srsSEXP);
    Rcpp::traits::input_parameter< arma::uword >::type n_top(n_topSEXP);
    Rcpp::traits::input_parameter< const arma::vec& >::type theta(thetaSEXP);
    Rcpp::traits::input_parameter< double >::type nugget(nuggetSEXP);
    Rcpp::traits::input_parameter< double >::type beta0(beta0SEXP);
    Rcpp::traits::input_parameter< const std::string& >::type Cov_fun(Cov_funSEXP);
    Rcpp::traits::input_parameter< bool >::type print_result(print_resultSEXP);
    rcpp_result_gen = Rcpp::wrap(GEMSS_cpp_update_sig(X, Y, X_val, Y_val, initial_idx, ns, c1, n_srs, n_top, theta, nugget, beta0, Cov_fun, print_result));
    return rcpp_result_gen;
END_RCPP
}
// gemss_removal_cpp
Rcpp::List gemss_removal_cpp(arma::mat X, arma::vec Y, const arma::vec& theta, double nugget, double beta0, double sig2, std::string Cov_fun, int n_remove, double c1);
RcppExport SEXP _GEMSS_gemss_removal_cpp(SEXP XSEXP, SEXP YSEXP, SEXP thetaSEXP, SEXP nuggetSEXP, SEXP beta0SEXP, SEXP sig2SEXP, SEXP Cov_funSEXP, SEXP n_removeSEXP, SEXP c1SEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< arma::mat >::type X(XSEXP);
    Rcpp::traits::input_parameter< arma::vec >::type Y(YSEXP);
    Rcpp::traits::input_parameter< const arma::vec& >::type theta(thetaSEXP);
    Rcpp::traits::input_parameter< double >::type nugget(nuggetSEXP);
    Rcpp::traits::input_parameter< double >::type beta0(beta0SEXP);
    Rcpp::traits::input_parameter< double >::type sig2(sig2SEXP);
    Rcpp::traits::input_parameter< std::string >::type Cov_fun(Cov_funSEXP);
    Rcpp::traits::input_parameter< int >::type n_remove(n_removeSEXP);
    Rcpp::traits::input_parameter< double >::type c1(c1SEXP);
    rcpp_result_gen = Rcpp::wrap(gemss_removal_cpp(X, Y, theta, nugget, beta0, sig2, Cov_fun, n_remove, c1));
    return rcpp_result_gen;
END_RCPP
}

static const R_CallMethodDef CallEntries[] = {
    {"_GEMSS_compute_kernel_cpp", (DL_FUNC) &_GEMSS_compute_kernel_cpp, 4},
    {"_GEMSS_gp_predict_cpp", (DL_FUNC) &_GEMSS_gp_predict_cpp, 5},
    {"_GEMSS_GEMSS_cpp_update_sig", (DL_FUNC) &_GEMSS_GEMSS_cpp_update_sig, 14},
    {"_GEMSS_gemss_removal_cpp", (DL_FUNC) &_GEMSS_gemss_removal_cpp, 9},
    {NULL, NULL, 0}
};

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