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

#ifndef RCPP_Upsilon_RCPPEXPORTS_H_GEN_
#define RCPP_Upsilon_RCPPEXPORTS_H_GEN_

#include <Rcpp.h>

namespace Upsilon {

    using namespace Rcpp;

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

    inline List chisq_cpp(const NumericVector& x, const NumericVector& y) {
        typedef SEXP(*Ptr_chisq_cpp)(SEXP,SEXP);
        static Ptr_chisq_cpp p_chisq_cpp = NULL;
        if (p_chisq_cpp == NULL) {
            validateSignature("List(*chisq_cpp)(const NumericVector&,const NumericVector&)");
            p_chisq_cpp = (Ptr_chisq_cpp)R_GetCCallable("Upsilon", "_Upsilon_chisq_cpp");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_chisq_cpp(Shield<SEXP>(Rcpp::wrap(x)), Shield<SEXP>(Rcpp::wrap(y)));
        }
        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 gtest_cpp(const NumericVector& x, const NumericVector& y) {
        typedef SEXP(*Ptr_gtest_cpp)(SEXP,SEXP);
        static Ptr_gtest_cpp p_gtest_cpp = NULL;
        if (p_gtest_cpp == NULL) {
            validateSignature("List(*gtest_cpp)(const NumericVector&,const NumericVector&)");
            p_gtest_cpp = (Ptr_gtest_cpp)R_GetCCallable("Upsilon", "_Upsilon_gtest_cpp");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_gtest_cpp(Shield<SEXP>(Rcpp::wrap(x)), Shield<SEXP>(Rcpp::wrap(y)));
        }
        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 double modified_chisq_statistic_cpp(const NumericMatrix& x) {
        typedef SEXP(*Ptr_modified_chisq_statistic_cpp)(SEXP);
        static Ptr_modified_chisq_statistic_cpp p_modified_chisq_statistic_cpp = NULL;
        if (p_modified_chisq_statistic_cpp == NULL) {
            validateSignature("double(*modified_chisq_statistic_cpp)(const NumericMatrix&)");
            p_modified_chisq_statistic_cpp = (Ptr_modified_chisq_statistic_cpp)R_GetCCallable("Upsilon", "_Upsilon_modified_chisq_statistic_cpp");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_modified_chisq_statistic_cpp(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<double >(rcpp_result_gen);
    }

    inline List upsilon_cpp(const IntegerVector& x, const IntegerVector& y) {
        typedef SEXP(*Ptr_upsilon_cpp)(SEXP,SEXP);
        static Ptr_upsilon_cpp p_upsilon_cpp = NULL;
        if (p_upsilon_cpp == NULL) {
            validateSignature("List(*upsilon_cpp)(const IntegerVector&,const IntegerVector&)");
            p_upsilon_cpp = (Ptr_upsilon_cpp)R_GetCCallable("Upsilon", "_Upsilon_upsilon_cpp");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_upsilon_cpp(Shield<SEXP>(Rcpp::wrap(x)), Shield<SEXP>(Rcpp::wrap(y)));
        }
        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 double upsilon_gof_statistic_cpp(const NumericVector& x, const NumericVector& p) {
        typedef SEXP(*Ptr_upsilon_gof_statistic_cpp)(SEXP,SEXP);
        static Ptr_upsilon_gof_statistic_cpp p_upsilon_gof_statistic_cpp = NULL;
        if (p_upsilon_gof_statistic_cpp == NULL) {
            validateSignature("double(*upsilon_gof_statistic_cpp)(const NumericVector&,const NumericVector&)");
            p_upsilon_gof_statistic_cpp = (Ptr_upsilon_gof_statistic_cpp)R_GetCCallable("Upsilon", "_Upsilon_upsilon_gof_statistic_cpp");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_upsilon_gof_statistic_cpp(Shield<SEXP>(Rcpp::wrap(x)), Shield<SEXP>(Rcpp::wrap(p)));
        }
        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 double upsilon_statistic_cpp(const NumericMatrix& x) {
        typedef SEXP(*Ptr_upsilon_statistic_cpp)(SEXP);
        static Ptr_upsilon_statistic_cpp p_upsilon_statistic_cpp = NULL;
        if (p_upsilon_statistic_cpp == NULL) {
            validateSignature("double(*upsilon_statistic_cpp)(const NumericMatrix&)");
            p_upsilon_statistic_cpp = (Ptr_upsilon_statistic_cpp)R_GetCCallable("Upsilon", "_Upsilon_upsilon_statistic_cpp");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_upsilon_statistic_cpp(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<double >(rcpp_result_gen);
    }

}

#endif // RCPP_Upsilon_RCPPEXPORTS_H_GEN_
