// Generated by using Rcpp::compileAttributes() -> do not edit by hand
// Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393

#ifndef RCPP_hpa_RCPPEXPORTS_H_GEN_
#define RCPP_hpa_RCPPEXPORTS_H_GEN_

#include <RcppArmadillo.h>
#include <Rcpp.h>

namespace hpa {

    using namespace Rcpp;

    namespace {
        void validateSignature(const char* sig) {
            Rcpp::Function require = Rcpp::Environment::base_env()["require"];
            require("hpa", Rcpp::Named("quietly") = true);
            typedef int(*Ptr_validate)(const char*);
            static Ptr_validate p_validate = (Ptr_validate)
                R_GetCCallable("hpa", "_hpa_RcppExport_validate");
            if (!p_validate(sig)) {
                throw Rcpp::function_not_exported(
                    "C++ function with signature '" + std::string(sig) + "' not found in hpa");
            }
        }
    }

    inline NumericVector dnorm_parallel(NumericVector x, double mean = 0, double sd = 1, bool is_parallel = false) {
        typedef SEXP(*Ptr_dnorm_parallel)(SEXP,SEXP,SEXP,SEXP);
        static Ptr_dnorm_parallel p_dnorm_parallel = NULL;
        if (p_dnorm_parallel == NULL) {
            validateSignature("NumericVector(*dnorm_parallel)(NumericVector,double,double,bool)");
            p_dnorm_parallel = (Ptr_dnorm_parallel)R_GetCCallable("hpa", "_hpa_dnorm_parallel");
        }
        RObject rcpp_result_gen;
        {
            rcpp_result_gen = p_dnorm_parallel(Shield<SEXP>(Rcpp::wrap(x)), Shield<SEXP>(Rcpp::wrap(mean)), Shield<SEXP>(Rcpp::wrap(sd)), Shield<SEXP>(Rcpp::wrap(is_parallel)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<NumericVector >(rcpp_result_gen);
    }

    inline NumericVector pnorm_parallel(NumericVector x, double mean = 0, double sd = 1, bool is_parallel = false) {
        typedef SEXP(*Ptr_pnorm_parallel)(SEXP,SEXP,SEXP,SEXP);
        static Ptr_pnorm_parallel p_pnorm_parallel = NULL;
        if (p_pnorm_parallel == NULL) {
            validateSignature("NumericVector(*pnorm_parallel)(NumericVector,double,double,bool)");
            p_pnorm_parallel = (Ptr_pnorm_parallel)R_GetCCallable("hpa", "_hpa_pnorm_parallel");
        }
        RObject rcpp_result_gen;
        {
            rcpp_result_gen = p_pnorm_parallel(Shield<SEXP>(Rcpp::wrap(x)), Shield<SEXP>(Rcpp::wrap(mean)), Shield<SEXP>(Rcpp::wrap(sd)), Shield<SEXP>(Rcpp::wrap(is_parallel)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<NumericVector >(rcpp_result_gen);
    }

    inline List dhpa0(const arma::vec x, const arma::vec pc, double mean = 0, double sd = 1, bool is_parallel = false, bool log = false, bool is_validation = true, bool is_grad = false) {
        typedef SEXP(*Ptr_dhpa0)(SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP);
        static Ptr_dhpa0 p_dhpa0 = NULL;
        if (p_dhpa0 == NULL) {
            validateSignature("List(*dhpa0)(const arma::vec,const arma::vec,double,double,bool,bool,bool,bool)");
            p_dhpa0 = (Ptr_dhpa0)R_GetCCallable("hpa", "_hpa_dhpa0");
        }
        RObject rcpp_result_gen;
        {
            rcpp_result_gen = p_dhpa0(Shield<SEXP>(Rcpp::wrap(x)), Shield<SEXP>(Rcpp::wrap(pc)), Shield<SEXP>(Rcpp::wrap(mean)), Shield<SEXP>(Rcpp::wrap(sd)), Shield<SEXP>(Rcpp::wrap(is_parallel)), Shield<SEXP>(Rcpp::wrap(log)), Shield<SEXP>(Rcpp::wrap(is_validation)), Shield<SEXP>(Rcpp::wrap(is_grad)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<List >(rcpp_result_gen);
    }

    inline List phpa0(const arma::vec x, const arma::vec pc, double mean = 0, double sd = 1, bool is_parallel = false, bool log = false, bool is_validation = true, bool is_grad = false) {
        typedef SEXP(*Ptr_phpa0)(SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP);
        static Ptr_phpa0 p_phpa0 = NULL;
        if (p_phpa0 == NULL) {
            validateSignature("List(*phpa0)(const arma::vec,const arma::vec,double,double,bool,bool,bool,bool)");
            p_phpa0 = (Ptr_phpa0)R_GetCCallable("hpa", "_hpa_phpa0");
        }
        RObject rcpp_result_gen;
        {
            rcpp_result_gen = p_phpa0(Shield<SEXP>(Rcpp::wrap(x)), Shield<SEXP>(Rcpp::wrap(pc)), Shield<SEXP>(Rcpp::wrap(mean)), Shield<SEXP>(Rcpp::wrap(sd)), Shield<SEXP>(Rcpp::wrap(is_parallel)), Shield<SEXP>(Rcpp::wrap(log)), Shield<SEXP>(Rcpp::wrap(is_validation)), Shield<SEXP>(Rcpp::wrap(is_grad)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<List >(rcpp_result_gen);
    }

    inline List hpaBinary(Rcpp::Formula formula, DataFrame data, int K = 1, double mean_fixed = NA_REAL, double sd_fixed = NA_REAL, double constant_fixed = 0, bool coef_fixed = true, bool is_x0_probit = true, bool is_sequence = false, NumericVector x0 = NumericVector(0), String cov_type = "sandwich", int boot_iter = 100, bool is_parallel = false, String opt_type = "optim", List opt_control = R_NilValue, bool is_validation = true) {
        typedef SEXP(*Ptr_hpaBinary)(SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP);
        static Ptr_hpaBinary p_hpaBinary = NULL;
        if (p_hpaBinary == NULL) {
            validateSignature("List(*hpaBinary)(Rcpp::Formula,DataFrame,int,double,double,double,bool,bool,bool,NumericVector,String,int,bool,String,List,bool)");
            p_hpaBinary = (Ptr_hpaBinary)R_GetCCallable("hpa", "_hpa_hpaBinary");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_hpaBinary(Shield<SEXP>(Rcpp::wrap(formula)), Shield<SEXP>(Rcpp::wrap(data)), Shield<SEXP>(Rcpp::wrap(K)), Shield<SEXP>(Rcpp::wrap(mean_fixed)), Shield<SEXP>(Rcpp::wrap(sd_fixed)), Shield<SEXP>(Rcpp::wrap(constant_fixed)), Shield<SEXP>(Rcpp::wrap(coef_fixed)), Shield<SEXP>(Rcpp::wrap(is_x0_probit)), Shield<SEXP>(Rcpp::wrap(is_sequence)), Shield<SEXP>(Rcpp::wrap(x0)), Shield<SEXP>(Rcpp::wrap(cov_type)), Shield<SEXP>(Rcpp::wrap(boot_iter)), Shield<SEXP>(Rcpp::wrap(is_parallel)), Shield<SEXP>(Rcpp::wrap(opt_type)), Shield<SEXP>(Rcpp::wrap(opt_control)), Shield<SEXP>(Rcpp::wrap(is_validation)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<List >(rcpp_result_gen);
    }

    inline NumericVector predict_hpaBinary(List object, DataFrame newdata = R_NilValue, bool is_prob = true) {
        typedef SEXP(*Ptr_predict_hpaBinary)(SEXP,SEXP,SEXP);
        static Ptr_predict_hpaBinary p_predict_hpaBinary = NULL;
        if (p_predict_hpaBinary == NULL) {
            validateSignature("NumericVector(*predict_hpaBinary)(List,DataFrame,bool)");
            p_predict_hpaBinary = (Ptr_predict_hpaBinary)R_GetCCallable("hpa", "_hpa_predict_hpaBinary");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_predict_hpaBinary(Shield<SEXP>(Rcpp::wrap(object)), Shield<SEXP>(Rcpp::wrap(newdata)), Shield<SEXP>(Rcpp::wrap(is_prob)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<NumericVector >(rcpp_result_gen);
    }

    inline List summary_hpaBinary(List object) {
        typedef SEXP(*Ptr_summary_hpaBinary)(SEXP);
        static Ptr_summary_hpaBinary p_summary_hpaBinary = NULL;
        if (p_summary_hpaBinary == NULL) {
            validateSignature("List(*summary_hpaBinary)(List)");
            p_summary_hpaBinary = (Ptr_summary_hpaBinary)R_GetCCallable("hpa", "_hpa_summary_hpaBinary");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_summary_hpaBinary(Shield<SEXP>(Rcpp::wrap(object)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<List >(rcpp_result_gen);
    }

    inline void print_summary_hpaBinary(List x) {
        typedef SEXP(*Ptr_print_summary_hpaBinary)(SEXP);
        static Ptr_print_summary_hpaBinary p_print_summary_hpaBinary = NULL;
        if (p_print_summary_hpaBinary == NULL) {
            validateSignature("void(*print_summary_hpaBinary)(List)");
            p_print_summary_hpaBinary = (Ptr_print_summary_hpaBinary)R_GetCCallable("hpa", "_hpa_print_summary_hpaBinary");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_print_summary_hpaBinary(Shield<SEXP>(Rcpp::wrap(x)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
    }

    inline double logLik_hpaBinary(List object) {
        typedef SEXP(*Ptr_logLik_hpaBinary)(SEXP);
        static Ptr_logLik_hpaBinary p_logLik_hpaBinary = NULL;
        if (p_logLik_hpaBinary == NULL) {
            validateSignature("double(*logLik_hpaBinary)(List)");
            p_logLik_hpaBinary = (Ptr_logLik_hpaBinary)R_GetCCallable("hpa", "_hpa_logLik_hpaBinary");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_logLik_hpaBinary(Shield<SEXP>(Rcpp::wrap(object)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<double >(rcpp_result_gen);
    }

    inline List hpaML(NumericVector data, NumericVector pol_degrees = NumericVector(0), NumericVector tr_left = NumericVector(0), NumericVector tr_right = NumericVector(0), NumericVector given_ind = NumericVector(0), NumericVector omit_ind = NumericVector(0), NumericVector x0 = NumericVector(0), String cov_type = "sandwich", int boot_iter = 100, bool is_parallel = false, String opt_type = "optim", List opt_control = R_NilValue, bool is_validation = true) {
        typedef SEXP(*Ptr_hpaML)(SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP);
        static Ptr_hpaML p_hpaML = NULL;
        if (p_hpaML == NULL) {
            validateSignature("List(*hpaML)(NumericVector,NumericVector,NumericVector,NumericVector,NumericVector,NumericVector,NumericVector,String,int,bool,String,List,bool)");
            p_hpaML = (Ptr_hpaML)R_GetCCallable("hpa", "_hpa_hpaML");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_hpaML(Shield<SEXP>(Rcpp::wrap(data)), Shield<SEXP>(Rcpp::wrap(pol_degrees)), Shield<SEXP>(Rcpp::wrap(tr_left)), Shield<SEXP>(Rcpp::wrap(tr_right)), Shield<SEXP>(Rcpp::wrap(given_ind)), Shield<SEXP>(Rcpp::wrap(omit_ind)), Shield<SEXP>(Rcpp::wrap(x0)), Shield<SEXP>(Rcpp::wrap(cov_type)), Shield<SEXP>(Rcpp::wrap(boot_iter)), Shield<SEXP>(Rcpp::wrap(is_parallel)), Shield<SEXP>(Rcpp::wrap(opt_type)), Shield<SEXP>(Rcpp::wrap(opt_control)), Shield<SEXP>(Rcpp::wrap(is_validation)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<List >(rcpp_result_gen);
    }

    inline NumericVector predict_hpaML(List object, NumericMatrix newdata = NumericMatrix(1, 1)) {
        typedef SEXP(*Ptr_predict_hpaML)(SEXP,SEXP);
        static Ptr_predict_hpaML p_predict_hpaML = NULL;
        if (p_predict_hpaML == NULL) {
            validateSignature("NumericVector(*predict_hpaML)(List,NumericMatrix)");
            p_predict_hpaML = (Ptr_predict_hpaML)R_GetCCallable("hpa", "_hpa_predict_hpaML");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_predict_hpaML(Shield<SEXP>(Rcpp::wrap(object)), Shield<SEXP>(Rcpp::wrap(newdata)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<NumericVector >(rcpp_result_gen);
    }

    inline List summary_hpaML(List object) {
        typedef SEXP(*Ptr_summary_hpaML)(SEXP);
        static Ptr_summary_hpaML p_summary_hpaML = NULL;
        if (p_summary_hpaML == NULL) {
            validateSignature("List(*summary_hpaML)(List)");
            p_summary_hpaML = (Ptr_summary_hpaML)R_GetCCallable("hpa", "_hpa_summary_hpaML");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_summary_hpaML(Shield<SEXP>(Rcpp::wrap(object)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<List >(rcpp_result_gen);
    }

    inline void print_summary_hpaML(List x) {
        typedef SEXP(*Ptr_print_summary_hpaML)(SEXP);
        static Ptr_print_summary_hpaML p_print_summary_hpaML = NULL;
        if (p_print_summary_hpaML == NULL) {
            validateSignature("void(*print_summary_hpaML)(List)");
            p_print_summary_hpaML = (Ptr_print_summary_hpaML)R_GetCCallable("hpa", "_hpa_print_summary_hpaML");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_print_summary_hpaML(Shield<SEXP>(Rcpp::wrap(x)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
    }

    inline double logLik_hpaML(List object) {
        typedef SEXP(*Ptr_logLik_hpaML)(SEXP);
        static Ptr_logLik_hpaML p_logLik_hpaML = NULL;
        if (p_logLik_hpaML == NULL) {
            validateSignature("double(*logLik_hpaML)(List)");
            p_logLik_hpaML = (Ptr_logLik_hpaML)R_GetCCallable("hpa", "_hpa_logLik_hpaML");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_logLik_hpaML(Shield<SEXP>(Rcpp::wrap(object)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<double >(rcpp_result_gen);
    }

    inline NumericVector mecdf(NumericMatrix x) {
        typedef SEXP(*Ptr_mecdf)(SEXP);
        static Ptr_mecdf p_mecdf = NULL;
        if (p_mecdf == NULL) {
            validateSignature("NumericVector(*mecdf)(NumericMatrix)");
            p_mecdf = (Ptr_mecdf)R_GetCCallable("hpa", "_hpa_mecdf");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_mecdf(Shield<SEXP>(Rcpp::wrap(x)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<NumericVector >(rcpp_result_gen);
    }

    inline List hpaMain(NumericVector x_lower_vec = NumericVector(0), NumericVector x_upper_vec = NumericVector(0), NumericVector pol_coefficients = NumericVector(0), NumericVector pol_degrees = NumericVector(0), String type = "pdf", NumericVector given_ind = NumericVector(0), NumericVector omit_ind = NumericVector(0), NumericVector mean = NumericVector(0), NumericVector sd = NumericVector(0), NumericVector expectation_powers = NumericVector(0), String grad_type = "NO", bool is_parallel = false, bool is_cdf = false, bool log = false, bool is_validation = true) {
        typedef SEXP(*Ptr_hpaMain)(SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP);
        static Ptr_hpaMain p_hpaMain = NULL;
        if (p_hpaMain == NULL) {
            validateSignature("List(*hpaMain)(NumericVector,NumericVector,NumericVector,NumericVector,String,NumericVector,NumericVector,NumericVector,NumericVector,NumericVector,String,bool,bool,bool,bool)");
            p_hpaMain = (Ptr_hpaMain)R_GetCCallable("hpa", "_hpa_hpaMain");
        }
        RObject rcpp_result_gen;
        {
            rcpp_result_gen = p_hpaMain(Shield<SEXP>(Rcpp::wrap(x_lower_vec)), Shield<SEXP>(Rcpp::wrap(x_upper_vec)), Shield<SEXP>(Rcpp::wrap(pol_coefficients)), Shield<SEXP>(Rcpp::wrap(pol_degrees)), Shield<SEXP>(Rcpp::wrap(type)), Shield<SEXP>(Rcpp::wrap(given_ind)), Shield<SEXP>(Rcpp::wrap(omit_ind)), Shield<SEXP>(Rcpp::wrap(mean)), Shield<SEXP>(Rcpp::wrap(sd)), Shield<SEXP>(Rcpp::wrap(expectation_powers)), Shield<SEXP>(Rcpp::wrap(grad_type)), Shield<SEXP>(Rcpp::wrap(is_parallel)), Shield<SEXP>(Rcpp::wrap(is_cdf)), Shield<SEXP>(Rcpp::wrap(log)), Shield<SEXP>(Rcpp::wrap(is_validation)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<List >(rcpp_result_gen);
    }

    inline NumericVector dhpa(NumericVector x, NumericVector pol_coefficients = NumericVector(0), NumericVector pol_degrees = NumericVector(0), NumericVector given_ind = NumericVector(0), NumericVector omit_ind = NumericVector(0), NumericVector mean = NumericVector(0), NumericVector sd = NumericVector(0), bool is_parallel = false, bool log = false, bool is_validation = true) {
        typedef SEXP(*Ptr_dhpa)(SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP);
        static Ptr_dhpa p_dhpa = NULL;
        if (p_dhpa == NULL) {
            validateSignature("NumericVector(*dhpa)(NumericVector,NumericVector,NumericVector,NumericVector,NumericVector,NumericVector,NumericVector,bool,bool,bool)");
            p_dhpa = (Ptr_dhpa)R_GetCCallable("hpa", "_hpa_dhpa");
        }
        RObject rcpp_result_gen;
        {
            rcpp_result_gen = p_dhpa(Shield<SEXP>(Rcpp::wrap(x)), Shield<SEXP>(Rcpp::wrap(pol_coefficients)), Shield<SEXP>(Rcpp::wrap(pol_degrees)), Shield<SEXP>(Rcpp::wrap(given_ind)), Shield<SEXP>(Rcpp::wrap(omit_ind)), Shield<SEXP>(Rcpp::wrap(mean)), Shield<SEXP>(Rcpp::wrap(sd)), Shield<SEXP>(Rcpp::wrap(is_parallel)), Shield<SEXP>(Rcpp::wrap(log)), Shield<SEXP>(Rcpp::wrap(is_validation)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<NumericVector >(rcpp_result_gen);
    }

    inline NumericVector phpa(NumericVector x, NumericVector pol_coefficients = NumericVector(0), NumericVector pol_degrees = NumericVector(0), NumericVector given_ind = NumericVector(0), NumericVector omit_ind = NumericVector(0), NumericVector mean = NumericVector(0), NumericVector sd = NumericVector(0), bool is_parallel = false, bool log = false, bool is_validation = true) {
        typedef SEXP(*Ptr_phpa)(SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP);
        static Ptr_phpa p_phpa = NULL;
        if (p_phpa == NULL) {
            validateSignature("NumericVector(*phpa)(NumericVector,NumericVector,NumericVector,NumericVector,NumericVector,NumericVector,NumericVector,bool,bool,bool)");
            p_phpa = (Ptr_phpa)R_GetCCallable("hpa", "_hpa_phpa");
        }
        RObject rcpp_result_gen;
        {
            rcpp_result_gen = p_phpa(Shield<SEXP>(Rcpp::wrap(x)), Shield<SEXP>(Rcpp::wrap(pol_coefficients)), Shield<SEXP>(Rcpp::wrap(pol_degrees)), Shield<SEXP>(Rcpp::wrap(given_ind)), Shield<SEXP>(Rcpp::wrap(omit_ind)), Shield<SEXP>(Rcpp::wrap(mean)), Shield<SEXP>(Rcpp::wrap(sd)), Shield<SEXP>(Rcpp::wrap(is_parallel)), Shield<SEXP>(Rcpp::wrap(log)), Shield<SEXP>(Rcpp::wrap(is_validation)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<NumericVector >(rcpp_result_gen);
    }

    inline NumericVector ihpa(NumericVector x_lower = NumericVector(0), NumericVector x_upper = NumericVector(0), NumericVector pol_coefficients = NumericVector(0), NumericVector pol_degrees = NumericVector(0), NumericVector given_ind = NumericVector(0), NumericVector omit_ind = NumericVector(0), NumericVector mean = NumericVector(0), NumericVector sd = NumericVector(0), bool is_parallel = false, bool log = false, bool is_validation = true) {
        typedef SEXP(*Ptr_ihpa)(SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP);
        static Ptr_ihpa p_ihpa = NULL;
        if (p_ihpa == NULL) {
            validateSignature("NumericVector(*ihpa)(NumericVector,NumericVector,NumericVector,NumericVector,NumericVector,NumericVector,NumericVector,NumericVector,bool,bool,bool)");
            p_ihpa = (Ptr_ihpa)R_GetCCallable("hpa", "_hpa_ihpa");
        }
        RObject rcpp_result_gen;
        {
            rcpp_result_gen = p_ihpa(Shield<SEXP>(Rcpp::wrap(x_lower)), Shield<SEXP>(Rcpp::wrap(x_upper)), Shield<SEXP>(Rcpp::wrap(pol_coefficients)), Shield<SEXP>(Rcpp::wrap(pol_degrees)), Shield<SEXP>(Rcpp::wrap(given_ind)), Shield<SEXP>(Rcpp::wrap(omit_ind)), Shield<SEXP>(Rcpp::wrap(mean)), Shield<SEXP>(Rcpp::wrap(sd)), Shield<SEXP>(Rcpp::wrap(is_parallel)), Shield<SEXP>(Rcpp::wrap(log)), Shield<SEXP>(Rcpp::wrap(is_validation)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<NumericVector >(rcpp_result_gen);
    }

    inline NumericVector ehpa(NumericVector x = NumericVector(0), NumericVector pol_coefficients = NumericVector(0), NumericVector pol_degrees = NumericVector(0), NumericVector given_ind = NumericVector(0), NumericVector omit_ind = NumericVector(0), NumericVector mean = NumericVector(0), NumericVector sd = NumericVector(0), NumericVector expectation_powers = NumericVector(0), bool is_parallel = false, bool is_validation = true) {
        typedef SEXP(*Ptr_ehpa)(SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP);
        static Ptr_ehpa p_ehpa = NULL;
        if (p_ehpa == NULL) {
            validateSignature("NumericVector(*ehpa)(NumericVector,NumericVector,NumericVector,NumericVector,NumericVector,NumericVector,NumericVector,NumericVector,bool,bool)");
            p_ehpa = (Ptr_ehpa)R_GetCCallable("hpa", "_hpa_ehpa");
        }
        RObject rcpp_result_gen;
        {
            rcpp_result_gen = p_ehpa(Shield<SEXP>(Rcpp::wrap(x)), Shield<SEXP>(Rcpp::wrap(pol_coefficients)), Shield<SEXP>(Rcpp::wrap(pol_degrees)), Shield<SEXP>(Rcpp::wrap(given_ind)), Shield<SEXP>(Rcpp::wrap(omit_ind)), Shield<SEXP>(Rcpp::wrap(mean)), Shield<SEXP>(Rcpp::wrap(sd)), Shield<SEXP>(Rcpp::wrap(expectation_powers)), Shield<SEXP>(Rcpp::wrap(is_parallel)), Shield<SEXP>(Rcpp::wrap(is_validation)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<NumericVector >(rcpp_result_gen);
    }

    inline NumericVector etrhpa(NumericVector tr_left = NumericVector(0), NumericVector tr_right = NumericVector(0), NumericVector pol_coefficients = NumericVector(0), NumericVector pol_degrees = NumericVector(0), NumericVector mean = NumericVector(0), NumericVector sd = NumericVector(0), NumericVector expectation_powers = NumericVector(0), bool is_parallel = false, bool is_validation = true) {
        typedef SEXP(*Ptr_etrhpa)(SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP);
        static Ptr_etrhpa p_etrhpa = NULL;
        if (p_etrhpa == NULL) {
            validateSignature("NumericVector(*etrhpa)(NumericVector,NumericVector,NumericVector,NumericVector,NumericVector,NumericVector,NumericVector,bool,bool)");
            p_etrhpa = (Ptr_etrhpa)R_GetCCallable("hpa", "_hpa_etrhpa");
        }
        RObject rcpp_result_gen;
        {
            rcpp_result_gen = p_etrhpa(Shield<SEXP>(Rcpp::wrap(tr_left)), Shield<SEXP>(Rcpp::wrap(tr_right)), Shield<SEXP>(Rcpp::wrap(pol_coefficients)), Shield<SEXP>(Rcpp::wrap(pol_degrees)), Shield<SEXP>(Rcpp::wrap(mean)), Shield<SEXP>(Rcpp::wrap(sd)), Shield<SEXP>(Rcpp::wrap(expectation_powers)), Shield<SEXP>(Rcpp::wrap(is_parallel)), Shield<SEXP>(Rcpp::wrap(is_validation)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<NumericVector >(rcpp_result_gen);
    }

    inline NumericVector dtrhpa(NumericVector x, NumericVector tr_left = NumericVector(0), NumericVector tr_right = NumericVector(0), NumericVector pol_coefficients = NumericVector(0), NumericVector pol_degrees = NumericVector(0), NumericVector given_ind = NumericVector(0), NumericVector omit_ind = NumericVector(0), NumericVector mean = NumericVector(0), NumericVector sd = NumericVector(0), bool is_parallel = false, bool log = false, bool is_validation = true) {
        typedef SEXP(*Ptr_dtrhpa)(SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP);
        static Ptr_dtrhpa p_dtrhpa = NULL;
        if (p_dtrhpa == NULL) {
            validateSignature("NumericVector(*dtrhpa)(NumericVector,NumericVector,NumericVector,NumericVector,NumericVector,NumericVector,NumericVector,NumericVector,NumericVector,bool,bool,bool)");
            p_dtrhpa = (Ptr_dtrhpa)R_GetCCallable("hpa", "_hpa_dtrhpa");
        }
        RObject rcpp_result_gen;
        {
            rcpp_result_gen = p_dtrhpa(Shield<SEXP>(Rcpp::wrap(x)), Shield<SEXP>(Rcpp::wrap(tr_left)), Shield<SEXP>(Rcpp::wrap(tr_right)), Shield<SEXP>(Rcpp::wrap(pol_coefficients)), Shield<SEXP>(Rcpp::wrap(pol_degrees)), Shield<SEXP>(Rcpp::wrap(given_ind)), Shield<SEXP>(Rcpp::wrap(omit_ind)), Shield<SEXP>(Rcpp::wrap(mean)), Shield<SEXP>(Rcpp::wrap(sd)), Shield<SEXP>(Rcpp::wrap(is_parallel)), Shield<SEXP>(Rcpp::wrap(log)), Shield<SEXP>(Rcpp::wrap(is_validation)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<NumericVector >(rcpp_result_gen);
    }

    inline NumericVector itrhpa(NumericVector x_lower = NumericVector(0), NumericVector x_upper = NumericVector(0), NumericVector tr_left = NumericVector(0), NumericVector tr_right = NumericVector(0), NumericVector pol_coefficients = NumericVector(0), NumericVector pol_degrees = NumericVector(0), NumericVector given_ind = NumericVector(0), NumericVector omit_ind = NumericVector(0), NumericVector mean = NumericVector(0), NumericVector sd = NumericVector(0), bool is_parallel = false, bool log = false, bool is_validation = true) {
        typedef SEXP(*Ptr_itrhpa)(SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP);
        static Ptr_itrhpa p_itrhpa = NULL;
        if (p_itrhpa == NULL) {
            validateSignature("NumericVector(*itrhpa)(NumericVector,NumericVector,NumericVector,NumericVector,NumericVector,NumericVector,NumericVector,NumericVector,NumericVector,NumericVector,bool,bool,bool)");
            p_itrhpa = (Ptr_itrhpa)R_GetCCallable("hpa", "_hpa_itrhpa");
        }
        RObject rcpp_result_gen;
        {
            rcpp_result_gen = p_itrhpa(Shield<SEXP>(Rcpp::wrap(x_lower)), Shield<SEXP>(Rcpp::wrap(x_upper)), Shield<SEXP>(Rcpp::wrap(tr_left)), Shield<SEXP>(Rcpp::wrap(tr_right)), Shield<SEXP>(Rcpp::wrap(pol_coefficients)), Shield<SEXP>(Rcpp::wrap(pol_degrees)), Shield<SEXP>(Rcpp::wrap(given_ind)), Shield<SEXP>(Rcpp::wrap(omit_ind)), Shield<SEXP>(Rcpp::wrap(mean)), Shield<SEXP>(Rcpp::wrap(sd)), Shield<SEXP>(Rcpp::wrap(is_parallel)), Shield<SEXP>(Rcpp::wrap(log)), Shield<SEXP>(Rcpp::wrap(is_validation)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<NumericVector >(rcpp_result_gen);
    }

    inline NumericMatrix dhpaDiff(NumericVector x, NumericVector pol_coefficients = NumericVector(0), NumericVector pol_degrees = NumericVector(0), NumericVector given_ind = NumericVector(0), NumericVector omit_ind = NumericVector(0), NumericVector mean = NumericVector(0), NumericVector sd = NumericVector(0), String type = "pol_coefficients", bool is_parallel = false, bool log = false, bool is_validation = true) {
        typedef SEXP(*Ptr_dhpaDiff)(SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP);
        static Ptr_dhpaDiff p_dhpaDiff = NULL;
        if (p_dhpaDiff == NULL) {
            validateSignature("NumericMatrix(*dhpaDiff)(NumericVector,NumericVector,NumericVector,NumericVector,NumericVector,NumericVector,NumericVector,String,bool,bool,bool)");
            p_dhpaDiff = (Ptr_dhpaDiff)R_GetCCallable("hpa", "_hpa_dhpaDiff");
        }
        RObject rcpp_result_gen;
        {
            rcpp_result_gen = p_dhpaDiff(Shield<SEXP>(Rcpp::wrap(x)), Shield<SEXP>(Rcpp::wrap(pol_coefficients)), Shield<SEXP>(Rcpp::wrap(pol_degrees)), Shield<SEXP>(Rcpp::wrap(given_ind)), Shield<SEXP>(Rcpp::wrap(omit_ind)), Shield<SEXP>(Rcpp::wrap(mean)), Shield<SEXP>(Rcpp::wrap(sd)), Shield<SEXP>(Rcpp::wrap(type)), Shield<SEXP>(Rcpp::wrap(is_parallel)), Shield<SEXP>(Rcpp::wrap(log)), Shield<SEXP>(Rcpp::wrap(is_validation)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<NumericMatrix >(rcpp_result_gen);
    }

    inline NumericMatrix ehpaDiff(NumericVector x = NumericVector(0), NumericVector pol_coefficients = NumericVector(0), NumericVector pol_degrees = NumericVector(0), NumericVector given_ind = NumericVector(0), NumericVector omit_ind = NumericVector(0), NumericVector mean = NumericVector(0), NumericVector sd = NumericVector(0), NumericVector expectation_powers = NumericVector(0), String type = "pol_coefficients", bool is_parallel = false, bool log = false, bool is_validation = true) {
        typedef SEXP(*Ptr_ehpaDiff)(SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP);
        static Ptr_ehpaDiff p_ehpaDiff = NULL;
        if (p_ehpaDiff == NULL) {
            validateSignature("NumericMatrix(*ehpaDiff)(NumericVector,NumericVector,NumericVector,NumericVector,NumericVector,NumericVector,NumericVector,NumericVector,String,bool,bool,bool)");
            p_ehpaDiff = (Ptr_ehpaDiff)R_GetCCallable("hpa", "_hpa_ehpaDiff");
        }
        RObject rcpp_result_gen;
        {
            rcpp_result_gen = p_ehpaDiff(Shield<SEXP>(Rcpp::wrap(x)), Shield<SEXP>(Rcpp::wrap(pol_coefficients)), Shield<SEXP>(Rcpp::wrap(pol_degrees)), Shield<SEXP>(Rcpp::wrap(given_ind)), Shield<SEXP>(Rcpp::wrap(omit_ind)), Shield<SEXP>(Rcpp::wrap(mean)), Shield<SEXP>(Rcpp::wrap(sd)), Shield<SEXP>(Rcpp::wrap(expectation_powers)), Shield<SEXP>(Rcpp::wrap(type)), Shield<SEXP>(Rcpp::wrap(is_parallel)), Shield<SEXP>(Rcpp::wrap(log)), Shield<SEXP>(Rcpp::wrap(is_validation)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<NumericMatrix >(rcpp_result_gen);
    }

    inline NumericMatrix ihpaDiff(NumericVector x_lower = NumericVector(0), NumericVector x_upper = NumericVector(0), NumericVector pol_coefficients = NumericVector(0), NumericVector pol_degrees = NumericVector(0), NumericVector given_ind = NumericVector(0), NumericVector omit_ind = NumericVector(0), NumericVector mean = NumericVector(0), NumericVector sd = NumericVector(0), String type = "pol_coefficients", bool is_parallel = false, bool log = false, bool is_validation = true) {
        typedef SEXP(*Ptr_ihpaDiff)(SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP);
        static Ptr_ihpaDiff p_ihpaDiff = NULL;
        if (p_ihpaDiff == NULL) {
            validateSignature("NumericMatrix(*ihpaDiff)(NumericVector,NumericVector,NumericVector,NumericVector,NumericVector,NumericVector,NumericVector,NumericVector,String,bool,bool,bool)");
            p_ihpaDiff = (Ptr_ihpaDiff)R_GetCCallable("hpa", "_hpa_ihpaDiff");
        }
        RObject rcpp_result_gen;
        {
            rcpp_result_gen = p_ihpaDiff(Shield<SEXP>(Rcpp::wrap(x_lower)), Shield<SEXP>(Rcpp::wrap(x_upper)), Shield<SEXP>(Rcpp::wrap(pol_coefficients)), Shield<SEXP>(Rcpp::wrap(pol_degrees)), Shield<SEXP>(Rcpp::wrap(given_ind)), Shield<SEXP>(Rcpp::wrap(omit_ind)), Shield<SEXP>(Rcpp::wrap(mean)), Shield<SEXP>(Rcpp::wrap(sd)), Shield<SEXP>(Rcpp::wrap(type)), Shield<SEXP>(Rcpp::wrap(is_parallel)), Shield<SEXP>(Rcpp::wrap(log)), Shield<SEXP>(Rcpp::wrap(is_validation)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<NumericMatrix >(rcpp_result_gen);
    }

    inline NumericVector qhpa(NumericVector p, NumericMatrix x = NumericMatrix(1, 1), NumericVector pol_coefficients = NumericVector(0), NumericVector pol_degrees = NumericVector(0), NumericVector given_ind = NumericVector(0), NumericVector omit_ind = NumericVector(0), NumericVector mean = NumericVector(0), NumericVector sd = NumericVector(0)) {
        typedef SEXP(*Ptr_qhpa)(SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP);
        static Ptr_qhpa p_qhpa = NULL;
        if (p_qhpa == NULL) {
            validateSignature("NumericVector(*qhpa)(NumericVector,NumericMatrix,NumericVector,NumericVector,NumericVector,NumericVector,NumericVector,NumericVector)");
            p_qhpa = (Ptr_qhpa)R_GetCCallable("hpa", "_hpa_qhpa");
        }
        RObject rcpp_result_gen;
        {
            rcpp_result_gen = p_qhpa(Shield<SEXP>(Rcpp::wrap(p)), Shield<SEXP>(Rcpp::wrap(x)), Shield<SEXP>(Rcpp::wrap(pol_coefficients)), Shield<SEXP>(Rcpp::wrap(pol_degrees)), Shield<SEXP>(Rcpp::wrap(given_ind)), Shield<SEXP>(Rcpp::wrap(omit_ind)), Shield<SEXP>(Rcpp::wrap(mean)), Shield<SEXP>(Rcpp::wrap(sd)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<NumericVector >(rcpp_result_gen);
    }

    inline NumericMatrix rhpa(int n, NumericVector pol_coefficients = NumericVector(0), NumericVector pol_degrees = NumericVector(0), NumericVector mean = NumericVector(0), NumericVector sd = NumericVector(0)) {
        typedef SEXP(*Ptr_rhpa)(SEXP,SEXP,SEXP,SEXP,SEXP);
        static Ptr_rhpa p_rhpa = NULL;
        if (p_rhpa == NULL) {
            validateSignature("NumericMatrix(*rhpa)(int,NumericVector,NumericVector,NumericVector,NumericVector)");
            p_rhpa = (Ptr_rhpa)R_GetCCallable("hpa", "_hpa_rhpa");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_rhpa(Shield<SEXP>(Rcpp::wrap(n)), Shield<SEXP>(Rcpp::wrap(pol_coefficients)), Shield<SEXP>(Rcpp::wrap(pol_degrees)), Shield<SEXP>(Rcpp::wrap(mean)), Shield<SEXP>(Rcpp::wrap(sd)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<NumericMatrix >(rcpp_result_gen);
    }

    inline Rcpp::List hpaSelection(Rcpp::Formula selection, Rcpp::Formula outcome, DataFrame data, int selection_K = 1, int outcome_K = 1, int pol_elements = 3, bool is_Newey = false, NumericVector x0 = NumericVector(0), bool is_Newey_loocv = false, String cov_type = "sandwich", int boot_iter = 100, bool is_parallel = false, String opt_type = "optim", List opt_control = R_NilValue, bool is_validation = true) {
        typedef SEXP(*Ptr_hpaSelection)(SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP);
        static Ptr_hpaSelection p_hpaSelection = NULL;
        if (p_hpaSelection == NULL) {
            validateSignature("Rcpp::List(*hpaSelection)(Rcpp::Formula,Rcpp::Formula,DataFrame,int,int,int,bool,NumericVector,bool,String,int,bool,String,List,bool)");
            p_hpaSelection = (Ptr_hpaSelection)R_GetCCallable("hpa", "_hpa_hpaSelection");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_hpaSelection(Shield<SEXP>(Rcpp::wrap(selection)), Shield<SEXP>(Rcpp::wrap(outcome)), Shield<SEXP>(Rcpp::wrap(data)), Shield<SEXP>(Rcpp::wrap(selection_K)), Shield<SEXP>(Rcpp::wrap(outcome_K)), Shield<SEXP>(Rcpp::wrap(pol_elements)), Shield<SEXP>(Rcpp::wrap(is_Newey)), Shield<SEXP>(Rcpp::wrap(x0)), Shield<SEXP>(Rcpp::wrap(is_Newey_loocv)), Shield<SEXP>(Rcpp::wrap(cov_type)), Shield<SEXP>(Rcpp::wrap(boot_iter)), Shield<SEXP>(Rcpp::wrap(is_parallel)), Shield<SEXP>(Rcpp::wrap(opt_type)), Shield<SEXP>(Rcpp::wrap(opt_control)), Shield<SEXP>(Rcpp::wrap(is_validation)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<Rcpp::List >(rcpp_result_gen);
    }

    inline List predict_hpaSelection(List object, DataFrame newdata = R_NilValue, std::string method = "HPA", bool is_cond = true, bool is_outcome = true) {
        typedef SEXP(*Ptr_predict_hpaSelection)(SEXP,SEXP,SEXP,SEXP,SEXP);
        static Ptr_predict_hpaSelection p_predict_hpaSelection = NULL;
        if (p_predict_hpaSelection == NULL) {
            validateSignature("List(*predict_hpaSelection)(List,DataFrame,std::string,bool,bool)");
            p_predict_hpaSelection = (Ptr_predict_hpaSelection)R_GetCCallable("hpa", "_hpa_predict_hpaSelection");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_predict_hpaSelection(Shield<SEXP>(Rcpp::wrap(object)), Shield<SEXP>(Rcpp::wrap(newdata)), Shield<SEXP>(Rcpp::wrap(method)), Shield<SEXP>(Rcpp::wrap(is_cond)), Shield<SEXP>(Rcpp::wrap(is_outcome)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<List >(rcpp_result_gen);
    }

    inline List summary_hpaSelection(List object) {
        typedef SEXP(*Ptr_summary_hpaSelection)(SEXP);
        static Ptr_summary_hpaSelection p_summary_hpaSelection = NULL;
        if (p_summary_hpaSelection == NULL) {
            validateSignature("List(*summary_hpaSelection)(List)");
            p_summary_hpaSelection = (Ptr_summary_hpaSelection)R_GetCCallable("hpa", "_hpa_summary_hpaSelection");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_summary_hpaSelection(Shield<SEXP>(Rcpp::wrap(object)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<List >(rcpp_result_gen);
    }

    inline void print_summary_hpaSelection(List x) {
        typedef SEXP(*Ptr_print_summary_hpaSelection)(SEXP);
        static Ptr_print_summary_hpaSelection p_print_summary_hpaSelection = NULL;
        if (p_print_summary_hpaSelection == NULL) {
            validateSignature("void(*print_summary_hpaSelection)(List)");
            p_print_summary_hpaSelection = (Ptr_print_summary_hpaSelection)R_GetCCallable("hpa", "_hpa_print_summary_hpaSelection");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_print_summary_hpaSelection(Shield<SEXP>(Rcpp::wrap(x)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
    }

    inline double logLik_hpaSelection(List object) {
        typedef SEXP(*Ptr_logLik_hpaSelection)(SEXP);
        static Ptr_logLik_hpaSelection p_logLik_hpaSelection = NULL;
        if (p_logLik_hpaSelection == NULL) {
            validateSignature("double(*logLik_hpaSelection)(List)");
            p_logLik_hpaSelection = (Ptr_logLik_hpaSelection)R_GetCCallable("hpa", "_hpa_logLik_hpaSelection");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_logLik_hpaSelection(Shield<SEXP>(Rcpp::wrap(object)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<double >(rcpp_result_gen);
    }

    inline NumericVector normalMoment(int k = 0, double mean = 0, double sd = 1, bool return_all_moments = false, bool is_validation = true, bool is_central = false, String diff_type = "NO") {
        typedef SEXP(*Ptr_normalMoment)(SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP);
        static Ptr_normalMoment p_normalMoment = NULL;
        if (p_normalMoment == NULL) {
            validateSignature("NumericVector(*normalMoment)(int,double,double,bool,bool,bool,String)");
            p_normalMoment = (Ptr_normalMoment)R_GetCCallable("hpa", "_hpa_normalMoment");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_normalMoment(Shield<SEXP>(Rcpp::wrap(k)), Shield<SEXP>(Rcpp::wrap(mean)), Shield<SEXP>(Rcpp::wrap(sd)), Shield<SEXP>(Rcpp::wrap(return_all_moments)), Shield<SEXP>(Rcpp::wrap(is_validation)), Shield<SEXP>(Rcpp::wrap(is_central)), Shield<SEXP>(Rcpp::wrap(diff_type)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<NumericVector >(rcpp_result_gen);
    }

    inline NumericMatrix truncatedNormalMoment(int k = 1, NumericVector x_lower = NumericVector(0), NumericVector x_upper = NumericVector(0), double mean = 0, double sd = 1, NumericVector pdf_lower = NumericVector(0), NumericVector cdf_lower = NumericVector(0), NumericVector pdf_upper = NumericVector(0), NumericVector cdf_upper = NumericVector(0), NumericVector cdf_difference = NumericVector(0), bool return_all_moments = false, bool is_validation = true, bool is_parallel = false, String diff_type = "NO") {
        typedef SEXP(*Ptr_truncatedNormalMoment)(SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP);
        static Ptr_truncatedNormalMoment p_truncatedNormalMoment = NULL;
        if (p_truncatedNormalMoment == NULL) {
            validateSignature("NumericMatrix(*truncatedNormalMoment)(int,NumericVector,NumericVector,double,double,NumericVector,NumericVector,NumericVector,NumericVector,NumericVector,bool,bool,bool,String)");
            p_truncatedNormalMoment = (Ptr_truncatedNormalMoment)R_GetCCallable("hpa", "_hpa_truncatedNormalMoment");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_truncatedNormalMoment(Shield<SEXP>(Rcpp::wrap(k)), Shield<SEXP>(Rcpp::wrap(x_lower)), Shield<SEXP>(Rcpp::wrap(x_upper)), Shield<SEXP>(Rcpp::wrap(mean)), Shield<SEXP>(Rcpp::wrap(sd)), Shield<SEXP>(Rcpp::wrap(pdf_lower)), Shield<SEXP>(Rcpp::wrap(cdf_lower)), Shield<SEXP>(Rcpp::wrap(pdf_upper)), Shield<SEXP>(Rcpp::wrap(cdf_upper)), Shield<SEXP>(Rcpp::wrap(cdf_difference)), Shield<SEXP>(Rcpp::wrap(return_all_moments)), Shield<SEXP>(Rcpp::wrap(is_validation)), Shield<SEXP>(Rcpp::wrap(is_parallel)), Shield<SEXP>(Rcpp::wrap(diff_type)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<NumericMatrix >(rcpp_result_gen);
    }

    inline NumericMatrix polynomialIndex(NumericVector pol_degrees = NumericVector(0), bool is_validation = true) {
        typedef SEXP(*Ptr_polynomialIndex)(SEXP,SEXP);
        static Ptr_polynomialIndex p_polynomialIndex = NULL;
        if (p_polynomialIndex == NULL) {
            validateSignature("NumericMatrix(*polynomialIndex)(NumericVector,bool)");
            p_polynomialIndex = (Ptr_polynomialIndex)R_GetCCallable("hpa", "_hpa_polynomialIndex");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_polynomialIndex(Shield<SEXP>(Rcpp::wrap(pol_degrees)), Shield<SEXP>(Rcpp::wrap(is_validation)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<NumericMatrix >(rcpp_result_gen);
    }

    inline Rcpp::String printPolynomial(NumericVector pol_degrees, NumericVector pol_coefficients, bool is_validation = true) {
        typedef SEXP(*Ptr_printPolynomial)(SEXP,SEXP,SEXP);
        static Ptr_printPolynomial p_printPolynomial = NULL;
        if (p_printPolynomial == NULL) {
            validateSignature("Rcpp::String(*printPolynomial)(NumericVector,NumericVector,bool)");
            p_printPolynomial = (Ptr_printPolynomial)R_GetCCallable("hpa", "_hpa_printPolynomial");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_printPolynomial(Shield<SEXP>(Rcpp::wrap(pol_degrees)), Shield<SEXP>(Rcpp::wrap(pol_coefficients)), Shield<SEXP>(Rcpp::wrap(is_validation)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<Rcpp::String >(rcpp_result_gen);
    }

    inline List bsplineMult(List b, double t1, double t2, bool is_left = true) {
        typedef SEXP(*Ptr_bsplineMult)(SEXP,SEXP,SEXP,SEXP);
        static Ptr_bsplineMult p_bsplineMult = NULL;
        if (p_bsplineMult == NULL) {
            validateSignature("List(*bsplineMult)(List,double,double,bool)");
            p_bsplineMult = (Ptr_bsplineMult)R_GetCCallable("hpa", "_hpa_bsplineMult");
        }
        RObject rcpp_result_gen;
        {
            rcpp_result_gen = p_bsplineMult(Shield<SEXP>(Rcpp::wrap(b)), Shield<SEXP>(Rcpp::wrap(t1)), Shield<SEXP>(Rcpp::wrap(t2)), Shield<SEXP>(Rcpp::wrap(is_left)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<List >(rcpp_result_gen);
    }

    inline List bsplineMerge(List b_left, List b_right) {
        typedef SEXP(*Ptr_bsplineMerge)(SEXP,SEXP);
        static Ptr_bsplineMerge p_bsplineMerge = NULL;
        if (p_bsplineMerge == NULL) {
            validateSignature("List(*bsplineMerge)(List,List)");
            p_bsplineMerge = (Ptr_bsplineMerge)R_GetCCallable("hpa", "_hpa_bsplineMerge");
        }
        RObject rcpp_result_gen;
        {
            rcpp_result_gen = p_bsplineMerge(Shield<SEXP>(Rcpp::wrap(b_left)), Shield<SEXP>(Rcpp::wrap(b_right)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<List >(rcpp_result_gen);
    }

    inline List bsplineNames(List b) {
        typedef SEXP(*Ptr_bsplineNames)(SEXP);
        static Ptr_bsplineNames p_bsplineNames = NULL;
        if (p_bsplineNames == NULL) {
            validateSignature("List(*bsplineNames)(List)");
            p_bsplineNames = (Ptr_bsplineNames)R_GetCCallable("hpa", "_hpa_bsplineNames");
        }
        RObject rcpp_result_gen;
        {
            rcpp_result_gen = p_bsplineNames(Shield<SEXP>(Rcpp::wrap(b)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<List >(rcpp_result_gen);
    }

    inline List bsplineGenerate(NumericVector knots, int degree, bool is_names = true) {
        typedef SEXP(*Ptr_bsplineGenerate)(SEXP,SEXP,SEXP);
        static Ptr_bsplineGenerate p_bsplineGenerate = NULL;
        if (p_bsplineGenerate == NULL) {
            validateSignature("List(*bsplineGenerate)(NumericVector,int,bool)");
            p_bsplineGenerate = (Ptr_bsplineGenerate)R_GetCCallable("hpa", "_hpa_bsplineGenerate");
        }
        RObject rcpp_result_gen;
        {
            rcpp_result_gen = p_bsplineGenerate(Shield<SEXP>(Rcpp::wrap(knots)), Shield<SEXP>(Rcpp::wrap(degree)), Shield<SEXP>(Rcpp::wrap(is_names)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<List >(rcpp_result_gen);
    }

    inline NumericVector bsplineEstimate(NumericVector x, NumericMatrix m, NumericVector knots) {
        typedef SEXP(*Ptr_bsplineEstimate)(SEXP,SEXP,SEXP);
        static Ptr_bsplineEstimate p_bsplineEstimate = NULL;
        if (p_bsplineEstimate == NULL) {
            validateSignature("NumericVector(*bsplineEstimate)(NumericVector,NumericMatrix,NumericVector)");
            p_bsplineEstimate = (Ptr_bsplineEstimate)R_GetCCallable("hpa", "_hpa_bsplineEstimate");
        }
        RObject rcpp_result_gen;
        {
            rcpp_result_gen = p_bsplineEstimate(Shield<SEXP>(Rcpp::wrap(x)), Shield<SEXP>(Rcpp::wrap(m)), Shield<SEXP>(Rcpp::wrap(knots)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<NumericVector >(rcpp_result_gen);
    }

    inline List bsplineComb(List splines, NumericVector weights) {
        typedef SEXP(*Ptr_bsplineComb)(SEXP,SEXP);
        static Ptr_bsplineComb p_bsplineComb = NULL;
        if (p_bsplineComb == NULL) {
            validateSignature("List(*bsplineComb)(List,NumericVector)");
            p_bsplineComb = (Ptr_bsplineComb)R_GetCCallable("hpa", "_hpa_bsplineComb");
        }
        RObject rcpp_result_gen;
        {
            rcpp_result_gen = p_bsplineComb(Shield<SEXP>(Rcpp::wrap(splines)), Shield<SEXP>(Rcpp::wrap(weights)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<List >(rcpp_result_gen);
    }

    inline NumericVector dhsa(NumericVector x, NumericMatrix m, NumericVector knots, double mean = 0, double sd = 1, bool log = false) {
        typedef SEXP(*Ptr_dhsa)(SEXP,SEXP,SEXP,SEXP,SEXP,SEXP);
        static Ptr_dhsa p_dhsa = NULL;
        if (p_dhsa == NULL) {
            validateSignature("NumericVector(*dhsa)(NumericVector,NumericMatrix,NumericVector,double,double,bool)");
            p_dhsa = (Ptr_dhsa)R_GetCCallable("hpa", "_hpa_dhsa");
        }
        RObject rcpp_result_gen;
        {
            rcpp_result_gen = p_dhsa(Shield<SEXP>(Rcpp::wrap(x)), Shield<SEXP>(Rcpp::wrap(m)), Shield<SEXP>(Rcpp::wrap(knots)), Shield<SEXP>(Rcpp::wrap(mean)), Shield<SEXP>(Rcpp::wrap(sd)), Shield<SEXP>(Rcpp::wrap(log)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<NumericVector >(rcpp_result_gen);
    }

    inline double ehsa(NumericMatrix m, NumericVector knots, double mean = 0, double sd = 1, double power = 1) {
        typedef SEXP(*Ptr_ehsa)(SEXP,SEXP,SEXP,SEXP,SEXP);
        static Ptr_ehsa p_ehsa = NULL;
        if (p_ehsa == NULL) {
            validateSignature("double(*ehsa)(NumericMatrix,NumericVector,double,double,double)");
            p_ehsa = (Ptr_ehsa)R_GetCCallable("hpa", "_hpa_ehsa");
        }
        RObject rcpp_result_gen;
        {
            rcpp_result_gen = p_ehsa(Shield<SEXP>(Rcpp::wrap(m)), Shield<SEXP>(Rcpp::wrap(knots)), Shield<SEXP>(Rcpp::wrap(mean)), Shield<SEXP>(Rcpp::wrap(sd)), Shield<SEXP>(Rcpp::wrap(power)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<double >(rcpp_result_gen);
    }

}

#endif // RCPP_hpa_RCPPEXPORTS_H_GEN_
