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

#ifndef RCPP_diffusr_RCPPEXPORTS_H_GEN_
#define RCPP_diffusr_RCPPEXPORTS_H_GEN_

#include <RcppEigen.h>
#include <Rcpp.h>

namespace diffusr {

    using namespace Rcpp;

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

    inline Eigen::MatrixXd heat_diffusion_(const Eigen::MatrixXd& v0, const Eigen::MatrixXd& W, const double t) {
        typedef SEXP(*Ptr_heat_diffusion_)(SEXP,SEXP,SEXP);
        static Ptr_heat_diffusion_ p_heat_diffusion_ = NULL;
        if (p_heat_diffusion_ == NULL) {
            validateSignature("Eigen::MatrixXd(*heat_diffusion_)(const Eigen::MatrixXd&,const Eigen::MatrixXd&,const double)");
            p_heat_diffusion_ = (Ptr_heat_diffusion_)R_GetCCallable("diffusr", "_diffusr_heat_diffusion_");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_heat_diffusion_(Shield<SEXP>(Rcpp::wrap(v0)), Shield<SEXP>(Rcpp::wrap(W)), Shield<SEXP>(Rcpp::wrap(t)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<Eigen::MatrixXd >(rcpp_result_gen);
    }

    inline Eigen::MatrixXd stoch_col_norm_(const Eigen::MatrixXd& W) {
        typedef SEXP(*Ptr_stoch_col_norm_)(SEXP);
        static Ptr_stoch_col_norm_ p_stoch_col_norm_ = NULL;
        if (p_stoch_col_norm_ == NULL) {
            validateSignature("Eigen::MatrixXd(*stoch_col_norm_)(const Eigen::MatrixXd&)");
            p_stoch_col_norm_ = (Ptr_stoch_col_norm_)R_GetCCallable("diffusr", "_diffusr_stoch_col_norm_");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_stoch_col_norm_(Shield<SEXP>(Rcpp::wrap(W)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<Eigen::MatrixXd >(rcpp_result_gen);
    }

    inline Eigen::MatrixXd laplacian_(const Eigen::MatrixXd& W) {
        typedef SEXP(*Ptr_laplacian_)(SEXP);
        static Ptr_laplacian_ p_laplacian_ = NULL;
        if (p_laplacian_ == NULL) {
            validateSignature("Eigen::MatrixXd(*laplacian_)(const Eigen::MatrixXd&)");
            p_laplacian_ = (Ptr_laplacian_)R_GetCCallable("diffusr", "_diffusr_laplacian_");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_laplacian_(Shield<SEXP>(Rcpp::wrap(W)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<Eigen::MatrixXd >(rcpp_result_gen);
    }

    inline std::vector<double> node_degrees_(const Eigen::MatrixXd& W) {
        typedef SEXP(*Ptr_node_degrees_)(SEXP);
        static Ptr_node_degrees_ p_node_degrees_ = NULL;
        if (p_node_degrees_ == NULL) {
            validateSignature("std::vector<double>(*node_degrees_)(const Eigen::MatrixXd&)");
            p_node_degrees_ = (Ptr_node_degrees_)R_GetCCallable("diffusr", "_diffusr_node_degrees_");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_node_degrees_(Shield<SEXP>(Rcpp::wrap(W)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<std::vector<double> >(rcpp_result_gen);
    }

    inline Eigen::MatrixXd hub_normalize_(const Eigen::MatrixXd& W) {
        typedef SEXP(*Ptr_hub_normalize_)(SEXP);
        static Ptr_hub_normalize_ p_hub_normalize_ = NULL;
        if (p_hub_normalize_ == NULL) {
            validateSignature("Eigen::MatrixXd(*hub_normalize_)(const Eigen::MatrixXd&)");
            p_hub_normalize_ = (Ptr_hub_normalize_)R_GetCCallable("diffusr", "_diffusr_hub_normalize_");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_hub_normalize_(Shield<SEXP>(Rcpp::wrap(W)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<Eigen::MatrixXd >(rcpp_result_gen);
    }

    inline Eigen::MatrixXd mrwr_(const Eigen::MatrixXd& p0, const Eigen::MatrixXd& W, const double r, const double thresh, const int niter, const bool do_analytical) {
        typedef SEXP(*Ptr_mrwr_)(SEXP,SEXP,SEXP,SEXP,SEXP,SEXP);
        static Ptr_mrwr_ p_mrwr_ = NULL;
        if (p_mrwr_ == NULL) {
            validateSignature("Eigen::MatrixXd(*mrwr_)(const Eigen::MatrixXd&,const Eigen::MatrixXd&,const double,const double,const int,const bool)");
            p_mrwr_ = (Ptr_mrwr_)R_GetCCallable("diffusr", "_diffusr_mrwr_");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_mrwr_(Shield<SEXP>(Rcpp::wrap(p0)), Shield<SEXP>(Rcpp::wrap(W)), Shield<SEXP>(Rcpp::wrap(r)), Shield<SEXP>(Rcpp::wrap(thresh)), Shield<SEXP>(Rcpp::wrap(niter)), Shield<SEXP>(Rcpp::wrap(do_analytical)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<Eigen::MatrixXd >(rcpp_result_gen);
    }

    inline Rcpp::List neighbors_(const Rcpp::IntegerVector& node_idxs, const Rcpp::NumericMatrix& W, const int k) {
        typedef SEXP(*Ptr_neighbors_)(SEXP,SEXP,SEXP);
        static Ptr_neighbors_ p_neighbors_ = NULL;
        if (p_neighbors_ == NULL) {
            validateSignature("Rcpp::List(*neighbors_)(const Rcpp::IntegerVector&,const Rcpp::NumericMatrix&,const int)");
            p_neighbors_ = (Ptr_neighbors_)R_GetCCallable("diffusr", "_diffusr_neighbors_");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_neighbors_(Shield<SEXP>(Rcpp::wrap(node_idxs)), Shield<SEXP>(Rcpp::wrap(W)), Shield<SEXP>(Rcpp::wrap(k)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        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);
    }

}

#endif // RCPP_diffusr_RCPPEXPORTS_H_GEN_
