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

// EsqeFun
arma::mat EsqeFun(arma::mat distmat, arma::vec covparms);
RcppExport SEXP _GPvecchia_EsqeFun(SEXP distmatSEXP, SEXP covparmsSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< arma::mat >::type distmat(distmatSEXP);
    Rcpp::traits::input_parameter< arma::vec >::type covparms(covparmsSEXP);
    rcpp_result_gen = Rcpp::wrap(EsqeFun(distmat, covparms));
    return rcpp_result_gen;
END_RCPP
}
// MaternFun
arma::mat MaternFun(arma::mat distmat, arma::vec covparms);
RcppExport SEXP _GPvecchia_MaternFun(SEXP distmatSEXP, SEXP covparmsSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< arma::mat >::type distmat(distmatSEXP);
    Rcpp::traits::input_parameter< arma::vec >::type covparms(covparmsSEXP);
    rcpp_result_gen = Rcpp::wrap(MaternFun(distmat, covparms));
    return rcpp_result_gen;
END_RCPP
}
// MaxMincpp
IntegerVector MaxMincpp(NumericMatrix locations);
RcppExport SEXP _GPvecchia_MaxMincpp(SEXP locationsSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< NumericMatrix >::type locations(locationsSEXP);
    rcpp_result_gen = Rcpp::wrap(MaxMincpp(locations));
    return rcpp_result_gen;
END_RCPP
}
// U_NZentries
List U_NZentries(const int Ncores, const arma::uword n, const arma::mat& locs, const arma::umat& revNNarray, const arma::mat& revCondOnLatent, const arma::vec& nuggets, const arma::vec& nuggets_obsord, const std::string covType, const arma::vec covparms);
RcppExport SEXP _GPvecchia_U_NZentries(SEXP NcoresSEXP, SEXP nSEXP, SEXP locsSEXP, SEXP revNNarraySEXP, SEXP revCondOnLatentSEXP, SEXP nuggetsSEXP, SEXP nuggets_obsordSEXP, SEXP covTypeSEXP, SEXP covparmsSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< const int >::type Ncores(NcoresSEXP);
    Rcpp::traits::input_parameter< const arma::uword >::type n(nSEXP);
    Rcpp::traits::input_parameter< const arma::mat& >::type locs(locsSEXP);
    Rcpp::traits::input_parameter< const arma::umat& >::type revNNarray(revNNarraySEXP);
    Rcpp::traits::input_parameter< const arma::mat& >::type revCondOnLatent(revCondOnLatentSEXP);
    Rcpp::traits::input_parameter< const arma::vec& >::type nuggets(nuggetsSEXP);
    Rcpp::traits::input_parameter< const arma::vec& >::type nuggets_obsord(nuggets_obsordSEXP);
    Rcpp::traits::input_parameter< const std::string >::type covType(covTypeSEXP);
    Rcpp::traits::input_parameter< const arma::vec >::type covparms(covparmsSEXP);
    rcpp_result_gen = Rcpp::wrap(U_NZentries(Ncores, n, locs, revNNarray, revCondOnLatent, nuggets, nuggets_obsord, covType, covparms));
    return rcpp_result_gen;
END_RCPP
}
// U_NZentries_mat
List U_NZentries_mat(int Ncores, const arma::uword n, const arma::mat& locs, const arma::umat& revNNarray, const arma::mat& revCondOnLatent, const arma::vec& nuggets, const arma::vec& nuggets_obsord, arma::mat& covVals, const arma::vec covparms);
RcppExport SEXP _GPvecchia_U_NZentries_mat(SEXP NcoresSEXP, SEXP nSEXP, SEXP locsSEXP, SEXP revNNarraySEXP, SEXP revCondOnLatentSEXP, SEXP nuggetsSEXP, SEXP nuggets_obsordSEXP, SEXP covValsSEXP, SEXP covparmsSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< int >::type Ncores(NcoresSEXP);
    Rcpp::traits::input_parameter< const arma::uword >::type n(nSEXP);
    Rcpp::traits::input_parameter< const arma::mat& >::type locs(locsSEXP);
    Rcpp::traits::input_parameter< const arma::umat& >::type revNNarray(revNNarraySEXP);
    Rcpp::traits::input_parameter< const arma::mat& >::type revCondOnLatent(revCondOnLatentSEXP);
    Rcpp::traits::input_parameter< const arma::vec& >::type nuggets(nuggetsSEXP);
    Rcpp::traits::input_parameter< const arma::vec& >::type nuggets_obsord(nuggets_obsordSEXP);
    Rcpp::traits::input_parameter< arma::mat& >::type covVals(covValsSEXP);
    Rcpp::traits::input_parameter< const arma::vec >::type covparms(covparmsSEXP);
    rcpp_result_gen = Rcpp::wrap(U_NZentries_mat(Ncores, n, locs, revNNarray, revCondOnLatent, nuggets, nuggets_obsord, covVals, covparms));
    return rcpp_result_gen;
END_RCPP
}
// generateNNarray
List generateNNarray(arma::mat locs, arma::uvec J, int M, arma::uvec r, int m);
RcppExport SEXP _GPvecchia_generateNNarray(SEXP locsSEXP, SEXP JSEXP, SEXP MSEXP, SEXP rSEXP, SEXP mSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< arma::mat >::type locs(locsSEXP);
    Rcpp::traits::input_parameter< arma::uvec >::type J(JSEXP);
    Rcpp::traits::input_parameter< int >::type M(MSEXP);
    Rcpp::traits::input_parameter< arma::uvec >::type r(rSEXP);
    Rcpp::traits::input_parameter< int >::type m(mSEXP);
    rcpp_result_gen = Rcpp::wrap(generateNNarray(locs, J, M, r, m));
    return rcpp_result_gen;
END_RCPP
}
// getMatCovFromFactorCpp
arma::mat getMatCovFromFactorCpp(arma::sp_mat F, arma::umat revNNarray);
RcppExport SEXP _GPvecchia_getMatCovFromFactorCpp(SEXP FSEXP, SEXP revNNarraySEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< arma::sp_mat >::type F(FSEXP);
    Rcpp::traits::input_parameter< arma::umat >::type revNNarray(revNNarraySEXP);
    rcpp_result_gen = Rcpp::wrap(getMatCovFromFactorCpp(F, revNNarray));
    return rcpp_result_gen;
END_RCPP
}
// ic0
NumericVector ic0(NumericVector ptrs, NumericVector inds, NumericVector vals);
RcppExport SEXP _GPvecchia_ic0(SEXP ptrsSEXP, SEXP indsSEXP, SEXP valsSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< NumericVector >::type ptrs(ptrsSEXP);
    Rcpp::traits::input_parameter< NumericVector >::type inds(indsSEXP);
    Rcpp::traits::input_parameter< NumericVector >::type vals(valsSEXP);
    rcpp_result_gen = Rcpp::wrap(ic0(ptrs, inds, vals));
    return rcpp_result_gen;
END_RCPP
}
// createUcppM
NumericVector createUcppM(NumericVector ptrs, NumericVector inds, NumericVector cov_vals);
RcppExport SEXP _GPvecchia_createUcppM(SEXP ptrsSEXP, SEXP indsSEXP, SEXP cov_valsSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< NumericVector >::type ptrs(ptrsSEXP);
    Rcpp::traits::input_parameter< NumericVector >::type inds(indsSEXP);
    Rcpp::traits::input_parameter< NumericVector >::type cov_vals(cov_valsSEXP);
    rcpp_result_gen = Rcpp::wrap(createUcppM(ptrs, inds, cov_vals));
    return rcpp_result_gen;
END_RCPP
}
// createUcpp
NumericVector createUcpp(NumericVector ptrs, NumericVector inds, arma::mat locsord, arma::vec covparams);
RcppExport SEXP _GPvecchia_createUcpp(SEXP ptrsSEXP, SEXP indsSEXP, SEXP locsordSEXP, SEXP covparamsSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< NumericVector >::type ptrs(ptrsSEXP);
    Rcpp::traits::input_parameter< NumericVector >::type inds(indsSEXP);
    Rcpp::traits::input_parameter< arma::mat >::type locsord(locsordSEXP);
    Rcpp::traits::input_parameter< arma::vec >::type covparams(covparamsSEXP);
    rcpp_result_gen = Rcpp::wrap(createUcpp(ptrs, inds, locsord, covparams));
    return rcpp_result_gen;
END_RCPP
}

static const R_CallMethodDef CallEntries[] = {
    {"_GPvecchia_EsqeFun", (DL_FUNC) &_GPvecchia_EsqeFun, 2},
    {"_GPvecchia_MaternFun", (DL_FUNC) &_GPvecchia_MaternFun, 2},
    {"_GPvecchia_MaxMincpp", (DL_FUNC) &_GPvecchia_MaxMincpp, 1},
    {"_GPvecchia_U_NZentries", (DL_FUNC) &_GPvecchia_U_NZentries, 9},
    {"_GPvecchia_U_NZentries_mat", (DL_FUNC) &_GPvecchia_U_NZentries_mat, 9},
    {"_GPvecchia_generateNNarray", (DL_FUNC) &_GPvecchia_generateNNarray, 5},
    {"_GPvecchia_getMatCovFromFactorCpp", (DL_FUNC) &_GPvecchia_getMatCovFromFactorCpp, 2},
    {"_GPvecchia_ic0", (DL_FUNC) &_GPvecchia_ic0, 3},
    {"_GPvecchia_createUcppM", (DL_FUNC) &_GPvecchia_createUcppM, 3},
    {"_GPvecchia_createUcpp", (DL_FUNC) &_GPvecchia_createUcpp, 4},
    {NULL, NULL, 0}
};

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