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

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

using namespace Rcpp;

#ifdef RCPP_USE_GLOBAL_ROSTREAM
Rcpp::Rostream<true>&  Rcpp::Rcout = Rcpp::Rcpp_cout_get();
Rcpp::Rostream<false>& Rcpp::Rcerr = Rcpp::Rcpp_cerr_get();
#endif

// ora_cpp
Rcpp::DataFrame ora_cpp(const Rcpp::CharacterVector& gene, const Rcpp::CharacterVector& universe, const Rcpp::List& gene_sets, const Rcpp::CharacterVector& gene_set_names);
RcppExport SEXP _enrichit_ora_cpp(SEXP geneSEXP, SEXP universeSEXP, SEXP gene_setsSEXP, SEXP gene_set_namesSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< const Rcpp::CharacterVector& >::type gene(geneSEXP);
    Rcpp::traits::input_parameter< const Rcpp::CharacterVector& >::type universe(universeSEXP);
    Rcpp::traits::input_parameter< const Rcpp::List& >::type gene_sets(gene_setsSEXP);
    Rcpp::traits::input_parameter< const Rcpp::CharacterVector& >::type gene_set_names(gene_set_namesSEXP);
    rcpp_result_gen = Rcpp::wrap(ora_cpp(gene, universe, gene_sets, gene_set_names));
    return rcpp_result_gen;
END_RCPP
}
// gsea_cpp
Rcpp::DataFrame gsea_cpp(const Rcpp::NumericVector& stats, const Rcpp::List& gene_sets, const Rcpp::CharacterVector& gene_set_names, int nPerm, double exponent, std::string method, int seed);
RcppExport SEXP _enrichit_gsea_cpp(SEXP statsSEXP, SEXP gene_setsSEXP, SEXP gene_set_namesSEXP, SEXP nPermSEXP, SEXP exponentSEXP, SEXP methodSEXP, SEXP seedSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type stats(statsSEXP);
    Rcpp::traits::input_parameter< const Rcpp::List& >::type gene_sets(gene_setsSEXP);
    Rcpp::traits::input_parameter< const Rcpp::CharacterVector& >::type gene_set_names(gene_set_namesSEXP);
    Rcpp::traits::input_parameter< int >::type nPerm(nPermSEXP);
    Rcpp::traits::input_parameter< double >::type exponent(exponentSEXP);
    Rcpp::traits::input_parameter< std::string >::type method(methodSEXP);
    Rcpp::traits::input_parameter< int >::type seed(seedSEXP);
    rcpp_result_gen = Rcpp::wrap(gsea_cpp(stats, gene_sets, gene_set_names, nPerm, exponent, method, seed));
    return rcpp_result_gen;
END_RCPP
}
// gsea_adaptive_cpp
Rcpp::DataFrame gsea_adaptive_cpp(const Rcpp::NumericVector& stats, const Rcpp::List& gene_sets, const Rcpp::CharacterVector& gene_set_names, int minPerm, int maxPerm, double pvalThreshold, double exponent, std::string method, int seed);
RcppExport SEXP _enrichit_gsea_adaptive_cpp(SEXP statsSEXP, SEXP gene_setsSEXP, SEXP gene_set_namesSEXP, SEXP minPermSEXP, SEXP maxPermSEXP, SEXP pvalThresholdSEXP, SEXP exponentSEXP, SEXP methodSEXP, SEXP seedSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type stats(statsSEXP);
    Rcpp::traits::input_parameter< const Rcpp::List& >::type gene_sets(gene_setsSEXP);
    Rcpp::traits::input_parameter< const Rcpp::CharacterVector& >::type gene_set_names(gene_set_namesSEXP);
    Rcpp::traits::input_parameter< int >::type minPerm(minPermSEXP);
    Rcpp::traits::input_parameter< int >::type maxPerm(maxPermSEXP);
    Rcpp::traits::input_parameter< double >::type pvalThreshold(pvalThresholdSEXP);
    Rcpp::traits::input_parameter< double >::type exponent(exponentSEXP);
    Rcpp::traits::input_parameter< std::string >::type method(methodSEXP);
    Rcpp::traits::input_parameter< int >::type seed(seedSEXP);
    rcpp_result_gen = Rcpp::wrap(gsea_adaptive_cpp(stats, gene_sets, gene_set_names, minPerm, maxPerm, pvalThreshold, exponent, method, seed));
    return rcpp_result_gen;
END_RCPP
}
// gsea_multilevel_cpp
Rcpp::DataFrame gsea_multilevel_cpp(const Rcpp::NumericVector& geneList, const Rcpp::List& gene_sets, const Rcpp::CharacterVector& gene_set_names, int minPerm, int maxPerm, double pvalThreshold, double exponent, std::string method, double eps, int sampleSize, int seed, int nPermSimple, std::string scoreType);
RcppExport SEXP _enrichit_gsea_multilevel_cpp(SEXP geneListSEXP, SEXP gene_setsSEXP, SEXP gene_set_namesSEXP, SEXP minPermSEXP, SEXP maxPermSEXP, SEXP pvalThresholdSEXP, SEXP exponentSEXP, SEXP methodSEXP, SEXP epsSEXP, SEXP sampleSizeSEXP, SEXP seedSEXP, SEXP nPermSimpleSEXP, SEXP scoreTypeSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type geneList(geneListSEXP);
    Rcpp::traits::input_parameter< const Rcpp::List& >::type gene_sets(gene_setsSEXP);
    Rcpp::traits::input_parameter< const Rcpp::CharacterVector& >::type gene_set_names(gene_set_namesSEXP);
    Rcpp::traits::input_parameter< int >::type minPerm(minPermSEXP);
    Rcpp::traits::input_parameter< int >::type maxPerm(maxPermSEXP);
    Rcpp::traits::input_parameter< double >::type pvalThreshold(pvalThresholdSEXP);
    Rcpp::traits::input_parameter< double >::type exponent(exponentSEXP);
    Rcpp::traits::input_parameter< std::string >::type method(methodSEXP);
    Rcpp::traits::input_parameter< double >::type eps(epsSEXP);
    Rcpp::traits::input_parameter< int >::type sampleSize(sampleSizeSEXP);
    Rcpp::traits::input_parameter< int >::type seed(seedSEXP);
    Rcpp::traits::input_parameter< int >::type nPermSimple(nPermSimpleSEXP);
    Rcpp::traits::input_parameter< std::string >::type scoreType(scoreTypeSEXP);
    rcpp_result_gen = Rcpp::wrap(gsea_multilevel_cpp(geneList, gene_sets, gene_set_names, minPerm, maxPerm, pvalThreshold, exponent, method, eps, sampleSize, seed, nPermSimple, scoreType));
    return rcpp_result_gen;
END_RCPP
}
// gsea_scores_cpp
Rcpp::DataFrame gsea_scores_cpp(const Rcpp::NumericVector& stats, const Rcpp::LogicalVector& in_set, double exponent);
RcppExport SEXP _enrichit_gsea_scores_cpp(SEXP statsSEXP, SEXP in_setSEXP, SEXP exponentSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< const Rcpp::NumericVector& >::type stats(statsSEXP);
    Rcpp::traits::input_parameter< const Rcpp::LogicalVector& >::type in_set(in_setSEXP);
    Rcpp::traits::input_parameter< double >::type exponent(exponentSEXP);
    rcpp_result_gen = Rcpp::wrap(gsea_scores_cpp(stats, in_set, exponent));
    return rcpp_result_gen;
END_RCPP
}
// rwr_eigen_cpp
Rcpp::List rwr_eigen_cpp(const Eigen::MappedSparseMatrix<double>& A, const Eigen::Map<Eigen::VectorXd>& v, double restart, double threshold, int max_iter);
RcppExport SEXP _enrichit_rwr_eigen_cpp(SEXP ASEXP, SEXP vSEXP, SEXP restartSEXP, SEXP thresholdSEXP, SEXP max_iterSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< const Eigen::MappedSparseMatrix<double>& >::type A(ASEXP);
    Rcpp::traits::input_parameter< const Eigen::Map<Eigen::VectorXd>& >::type v(vSEXP);
    Rcpp::traits::input_parameter< double >::type restart(restartSEXP);
    Rcpp::traits::input_parameter< double >::type threshold(thresholdSEXP);
    Rcpp::traits::input_parameter< int >::type max_iter(max_iterSEXP);
    rcpp_result_gen = Rcpp::wrap(rwr_eigen_cpp(A, v, restart, threshold, max_iter));
    return rcpp_result_gen;
END_RCPP
}

static const R_CallMethodDef CallEntries[] = {
    {"_enrichit_ora_cpp", (DL_FUNC) &_enrichit_ora_cpp, 4},
    {"_enrichit_gsea_cpp", (DL_FUNC) &_enrichit_gsea_cpp, 7},
    {"_enrichit_gsea_adaptive_cpp", (DL_FUNC) &_enrichit_gsea_adaptive_cpp, 9},
    {"_enrichit_gsea_multilevel_cpp", (DL_FUNC) &_enrichit_gsea_multilevel_cpp, 13},
    {"_enrichit_gsea_scores_cpp", (DL_FUNC) &_enrichit_gsea_scores_cpp, 3},
    {"_enrichit_rwr_eigen_cpp", (DL_FUNC) &_enrichit_rwr_eigen_cpp, 5},
    {NULL, NULL, 0}
};

RcppExport void R_init_enrichit(DllInfo *dll) {
    R_registerRoutines(dll, NULL, CallEntries, NULL, NULL);
    R_useDynamicSymbols(dll, FALSE);
}
