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

#ifndef RCPP_philentropy_RCPPEXPORTS_H_GEN_
#define RCPP_philentropy_RCPPEXPORTS_H_GEN_

#include <Rcpp.h>

namespace philentropy {

    using namespace Rcpp;

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

    inline Rcpp::NumericMatrix as_matrix(Rcpp::DataFrame x) {
        typedef SEXP(*Ptr_as_matrix)(SEXP);
        static Ptr_as_matrix p_as_matrix = NULL;
        if (p_as_matrix == NULL) {
            validateSignature("Rcpp::NumericMatrix(*as_matrix)(Rcpp::DataFrame)");
            p_as_matrix = (Ptr_as_matrix)R_GetCCallable("philentropy", "_philentropy_as_matrix");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_as_matrix(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<Rcpp::NumericMatrix >(rcpp_result_gen);
    }

    inline Rcpp::DataFrame as_data_frame(Rcpp::NumericMatrix mat) {
        typedef SEXP(*Ptr_as_data_frame)(SEXP);
        static Ptr_as_data_frame p_as_data_frame = NULL;
        if (p_as_data_frame == NULL) {
            validateSignature("Rcpp::DataFrame(*as_data_frame)(Rcpp::NumericMatrix)");
            p_as_data_frame = (Ptr_as_data_frame)R_GetCCallable("philentropy", "_philentropy_as_data_frame");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_as_data_frame(Shield<SEXP>(Rcpp::wrap(mat)));
        }
        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::DataFrame >(rcpp_result_gen);
    }

    inline SEXP sum_rcpp(SEXP vec) {
        typedef SEXP(*Ptr_sum_rcpp)(SEXP);
        static Ptr_sum_rcpp p_sum_rcpp = NULL;
        if (p_sum_rcpp == NULL) {
            validateSignature("SEXP(*sum_rcpp)(SEXP)");
            p_sum_rcpp = (Ptr_sum_rcpp)R_GetCCallable("philentropy", "_philentropy_sum_rcpp");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_sum_rcpp(Shield<SEXP>(Rcpp::wrap(vec)));
        }
        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<SEXP >(rcpp_result_gen);
    }

    inline SEXP est_prob_empirical(SEXP CountVec) {
        typedef SEXP(*Ptr_est_prob_empirical)(SEXP);
        static Ptr_est_prob_empirical p_est_prob_empirical = NULL;
        if (p_est_prob_empirical == NULL) {
            validateSignature("SEXP(*est_prob_empirical)(SEXP)");
            p_est_prob_empirical = (Ptr_est_prob_empirical)R_GetCCallable("philentropy", "_philentropy_est_prob_empirical");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_est_prob_empirical(Shield<SEXP>(Rcpp::wrap(CountVec)));
        }
        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<SEXP >(rcpp_result_gen);
    }

}

#endif // RCPP_philentropy_RCPPEXPORTS_H_GEN_
