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

#ifndef RCPP_gof_RCPPEXPORTS_H_GEN_
#define RCPP_gof_RCPPEXPORTS_H_GEN_

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

namespace gof {

    using namespace Rcpp;

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

    inline double SupTest(const arma::vec& x) {
        typedef SEXP(*Ptr_SupTest)(SEXP);
        static Ptr_SupTest p_SupTest = NULL;
        if (p_SupTest == NULL) {
            validateSignature("double(*SupTest)(const arma::vec&)");
            p_SupTest = (Ptr_SupTest)R_GetCCallable("gof", "_gof_SupTest");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_SupTest(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 double L2Test(const arma::vec& x, const arma::vec& t) {
        typedef SEXP(*Ptr_L2Test)(SEXP,SEXP);
        static Ptr_L2Test p_L2Test = NULL;
        if (p_L2Test == NULL) {
            validateSignature("double(*L2Test)(const arma::vec&,const arma::vec&)");
            p_L2Test = (Ptr_L2Test)R_GetCCallable("gof", "_gof_L2Test");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_L2Test(Shield<SEXP>(Rcpp::wrap(x)), Shield<SEXP>(Rcpp::wrap(t)));
        }
        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_gof_RCPPEXPORTS_H_GEN_
