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

#ifndef RCPP_gRbase_RCPPEXPORTS_H_GEN_
#define RCPP_gRbase_RCPPEXPORTS_H_GEN_

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

namespace gRbase {

    using namespace Rcpp;

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

    inline IntegerVector do_mcs_sparse(const MSpMat& X, const IntegerVector& mcs0idx_) {
        typedef SEXP(*Ptr_do_mcs_sparse)(SEXP,SEXP);
        static Ptr_do_mcs_sparse p_do_mcs_sparse = NULL;
        if (p_do_mcs_sparse == NULL) {
            validateSignature("IntegerVector(*do_mcs_sparse)(const MSpMat&,const IntegerVector&)");
            p_do_mcs_sparse = (Ptr_do_mcs_sparse)R_GetCCallable("gRbase", "gRbase_do_mcs_sparse");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_do_mcs_sparse(Rcpp::wrap(X), Rcpp::wrap(mcs0idx_));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<IntegerVector >(rcpp_result_gen);
    }

    inline SEXP do_mcs_dense(const NumericMatrix& X, const IntegerVector& mcs0idx) {
        typedef SEXP(*Ptr_do_mcs_dense)(SEXP,SEXP);
        static Ptr_do_mcs_dense p_do_mcs_dense = NULL;
        if (p_do_mcs_dense == NULL) {
            validateSignature("SEXP(*do_mcs_dense)(const NumericMatrix&,const IntegerVector&)");
            p_do_mcs_dense = (Ptr_do_mcs_dense)R_GetCCallable("gRbase", "gRbase_do_mcs_dense");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_do_mcs_dense(Rcpp::wrap(X), Rcpp::wrap(mcs0idx));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<SEXP >(rcpp_result_gen);
    }

    inline SEXP mcsMAT0_(SEXP XX_, SEXP mcs0idx_ = R_NilValue) {
        typedef SEXP(*Ptr_mcsMAT0_)(SEXP,SEXP);
        static Ptr_mcsMAT0_ p_mcsMAT0_ = NULL;
        if (p_mcsMAT0_ == NULL) {
            validateSignature("SEXP(*mcsMAT0_)(SEXP,SEXP)");
            p_mcsMAT0_ = (Ptr_mcsMAT0_)R_GetCCallable("gRbase", "gRbase_mcsMAT0_");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_mcsMAT0_(Rcpp::wrap(XX_), Rcpp::wrap(mcs0idx_));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<SEXP >(rcpp_result_gen);
    }

    inline List rip_internal(IntegerVector mcs0idx, CharacterVector vn, List cqlist) {
        typedef SEXP(*Ptr_rip_internal)(SEXP,SEXP,SEXP);
        static Ptr_rip_internal p_rip_internal = NULL;
        if (p_rip_internal == NULL) {
            validateSignature("List(*rip_internal)(IntegerVector,CharacterVector,List)");
            p_rip_internal = (Ptr_rip_internal)R_GetCCallable("gRbase", "gRbase_rip_internal");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_rip_internal(Rcpp::wrap(mcs0idx), Rcpp::wrap(vn), Rcpp::wrap(cqlist));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<List >(rcpp_result_gen);
    }

    inline SEXP do_getcq_sparse(SEXP XX_, const IntegerVector& mcs0idx_) {
        typedef SEXP(*Ptr_do_getcq_sparse)(SEXP,SEXP);
        static Ptr_do_getcq_sparse p_do_getcq_sparse = NULL;
        if (p_do_getcq_sparse == NULL) {
            validateSignature("SEXP(*do_getcq_sparse)(SEXP,const IntegerVector&)");
            p_do_getcq_sparse = (Ptr_do_getcq_sparse)R_GetCCallable("gRbase", "gRbase_do_getcq_sparse");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_do_getcq_sparse(Rcpp::wrap(XX_), Rcpp::wrap(mcs0idx_));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<SEXP >(rcpp_result_gen);
    }

    inline SEXP do_getcq_dense(NumericMatrix X, const IntegerVector& mcs0idx) {
        typedef SEXP(*Ptr_do_getcq_dense)(SEXP,SEXP);
        static Ptr_do_getcq_dense p_do_getcq_dense = NULL;
        if (p_do_getcq_dense == NULL) {
            validateSignature("SEXP(*do_getcq_dense)(NumericMatrix,const IntegerVector&)");
            p_do_getcq_dense = (Ptr_do_getcq_dense)R_GetCCallable("gRbase", "gRbase_do_getcq_dense");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_do_getcq_dense(Rcpp::wrap(X), Rcpp::wrap(mcs0idx));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<SEXP >(rcpp_result_gen);
    }

    inline SEXP getCliquesDec_(SEXP XX_, SEXP mcs0idx_ = R_NilValue) {
        typedef SEXP(*Ptr_getCliquesDec_)(SEXP,SEXP);
        static Ptr_getCliquesDec_ p_getCliquesDec_ = NULL;
        if (p_getCliquesDec_ == NULL) {
            validateSignature("SEXP(*getCliquesDec_)(SEXP,SEXP)");
            p_getCliquesDec_ = (Ptr_getCliquesDec_)R_GetCCallable("gRbase", "gRbase_getCliquesDec_");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_getCliquesDec_(Rcpp::wrap(XX_), Rcpp::wrap(mcs0idx_));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<SEXP >(rcpp_result_gen);
    }

    inline SEXP dagList2dgCMatrix(List LL, CharacterVector vn) {
        typedef SEXP(*Ptr_dagList2dgCMatrix)(SEXP,SEXP);
        static Ptr_dagList2dgCMatrix p_dagList2dgCMatrix = NULL;
        if (p_dagList2dgCMatrix == NULL) {
            validateSignature("SEXP(*dagList2dgCMatrix)(List,CharacterVector)");
            p_dagList2dgCMatrix = (Ptr_dagList2dgCMatrix)R_GetCCallable("gRbase", "gRbase_dagList2dgCMatrix");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_dagList2dgCMatrix(Rcpp::wrap(LL), Rcpp::wrap(vn));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<SEXP >(rcpp_result_gen);
    }

    inline SEXP ugList2dgCMatrix(List LL, CharacterVector vn) {
        typedef SEXP(*Ptr_ugList2dgCMatrix)(SEXP,SEXP);
        static Ptr_ugList2dgCMatrix p_ugList2dgCMatrix = NULL;
        if (p_ugList2dgCMatrix == NULL) {
            validateSignature("SEXP(*ugList2dgCMatrix)(List,CharacterVector)");
            p_ugList2dgCMatrix = (Ptr_ugList2dgCMatrix)R_GetCCallable("gRbase", "gRbase_ugList2dgCMatrix");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_ugList2dgCMatrix(Rcpp::wrap(LL), Rcpp::wrap(vn));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<SEXP >(rcpp_result_gen);
    }

    inline SEXP dagList2matrix(List LL, CharacterVector vn) {
        typedef SEXP(*Ptr_dagList2matrix)(SEXP,SEXP);
        static Ptr_dagList2matrix p_dagList2matrix = NULL;
        if (p_dagList2matrix == NULL) {
            validateSignature("SEXP(*dagList2matrix)(List,CharacterVector)");
            p_dagList2matrix = (Ptr_dagList2matrix)R_GetCCallable("gRbase", "gRbase_dagList2matrix");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_dagList2matrix(Rcpp::wrap(LL), Rcpp::wrap(vn));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<SEXP >(rcpp_result_gen);
    }

    inline SEXP ugList2matrix(List LL, CharacterVector vn) {
        typedef SEXP(*Ptr_ugList2matrix)(SEXP,SEXP);
        static Ptr_ugList2matrix p_ugList2matrix = NULL;
        if (p_ugList2matrix == NULL) {
            validateSignature("SEXP(*ugList2matrix)(List,CharacterVector)");
            p_ugList2matrix = (Ptr_ugList2matrix)R_GetCCallable("gRbase", "gRbase_ugList2matrix");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_ugList2matrix(Rcpp::wrap(LL), Rcpp::wrap(vn));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<SEXP >(rcpp_result_gen);
    }

    inline List adjList2tfList(List LL) {
        typedef SEXP(*Ptr_adjList2tfList)(SEXP);
        static Ptr_adjList2tfList p_adjList2tfList = NULL;
        if (p_adjList2tfList == NULL) {
            validateSignature("List(*adjList2tfList)(List)");
            p_adjList2tfList = (Ptr_adjList2tfList)R_GetCCallable("gRbase", "gRbase_adjList2tfList");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_adjList2tfList(Rcpp::wrap(LL));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<List >(rcpp_result_gen);
    }

    inline List adjList2ftList(List LL) {
        typedef SEXP(*Ptr_adjList2ftList)(SEXP);
        static Ptr_adjList2ftList p_adjList2ftList = NULL;
        if (p_adjList2ftList == NULL) {
            validateSignature("List(*adjList2ftList)(List)");
            p_adjList2ftList = (Ptr_adjList2ftList)R_GetCCallable("gRbase", "gRbase_adjList2ftList");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_adjList2ftList(Rcpp::wrap(LL));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<List >(rcpp_result_gen);
    }

    inline CharacterMatrix adjList2ftM(List LL) {
        typedef SEXP(*Ptr_adjList2ftM)(SEXP);
        static Ptr_adjList2ftM p_adjList2ftM = NULL;
        if (p_adjList2ftM == NULL) {
            validateSignature("CharacterMatrix(*adjList2ftM)(List)");
            p_adjList2ftM = (Ptr_adjList2ftM)R_GetCCallable("gRbase", "gRbase_adjList2ftM");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_adjList2ftM(Rcpp::wrap(LL));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<CharacterMatrix >(rcpp_result_gen);
    }

    inline CharacterMatrix adjList2tfM(List LL) {
        typedef SEXP(*Ptr_adjList2tfM)(SEXP);
        static Ptr_adjList2tfM p_adjList2tfM = NULL;
        if (p_adjList2tfM == NULL) {
            validateSignature("CharacterMatrix(*adjList2tfM)(List)");
            p_adjList2tfM = (Ptr_adjList2tfM)R_GetCCallable("gRbase", "gRbase_adjList2tfM");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_adjList2tfM(Rcpp::wrap(LL));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<CharacterMatrix >(rcpp_result_gen);
    }

    inline SEXP adjList2matrix(List LL) {
        typedef SEXP(*Ptr_adjList2matrix)(SEXP);
        static Ptr_adjList2matrix p_adjList2matrix = NULL;
        if (p_adjList2matrix == NULL) {
            validateSignature("SEXP(*adjList2matrix)(List)");
            p_adjList2matrix = (Ptr_adjList2matrix)R_GetCCallable("gRbase", "gRbase_adjList2matrix");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_adjList2matrix(Rcpp::wrap(LL));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<SEXP >(rcpp_result_gen);
    }

    inline SEXP adjList2dgCMatrix(List LL) {
        typedef SEXP(*Ptr_adjList2dgCMatrix)(SEXP);
        static Ptr_adjList2dgCMatrix p_adjList2dgCMatrix = NULL;
        if (p_adjList2dgCMatrix == NULL) {
            validateSignature("SEXP(*adjList2dgCMatrix)(List)");
            p_adjList2dgCMatrix = (Ptr_adjList2dgCMatrix)R_GetCCallable("gRbase", "gRbase_adjList2dgCMatrix");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_adjList2dgCMatrix(Rcpp::wrap(LL));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<SEXP >(rcpp_result_gen);
    }

    inline int cell2entry_cpp(NumericVector cell, IntegerVector dim) {
        typedef SEXP(*Ptr_cell2entry_cpp)(SEXP,SEXP);
        static Ptr_cell2entry_cpp p_cell2entry_cpp = NULL;
        if (p_cell2entry_cpp == NULL) {
            validateSignature("int(*cell2entry_cpp)(NumericVector,IntegerVector)");
            p_cell2entry_cpp = (Ptr_cell2entry_cpp)R_GetCCallable("gRbase", "gRbase_cell2entry_cpp");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_cell2entry_cpp(Rcpp::wrap(cell), Rcpp::wrap(dim));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<int >(rcpp_result_gen);
    }

    inline int cell2entry2_cpp(NumericVector cell, IntegerVector plevels) {
        typedef SEXP(*Ptr_cell2entry2_cpp)(SEXP,SEXP);
        static Ptr_cell2entry2_cpp p_cell2entry2_cpp = NULL;
        if (p_cell2entry2_cpp == NULL) {
            validateSignature("int(*cell2entry2_cpp)(NumericVector,IntegerVector)");
            p_cell2entry2_cpp = (Ptr_cell2entry2_cpp)R_GetCCallable("gRbase", "gRbase_cell2entry2_cpp");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_cell2entry2_cpp(Rcpp::wrap(cell), Rcpp::wrap(plevels));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<int >(rcpp_result_gen);
    }

    inline NumericVector nextCell_cpp(NumericVector cell, IntegerVector dim) {
        typedef SEXP(*Ptr_nextCell_cpp)(SEXP,SEXP);
        static Ptr_nextCell_cpp p_nextCell_cpp = NULL;
        if (p_nextCell_cpp == NULL) {
            validateSignature("NumericVector(*nextCell_cpp)(NumericVector,IntegerVector)");
            p_nextCell_cpp = (Ptr_nextCell_cpp)R_GetCCallable("gRbase", "gRbase_nextCell_cpp");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_nextCell_cpp(Rcpp::wrap(cell), Rcpp::wrap(dim));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<NumericVector >(rcpp_result_gen);
    }

    inline NumericVector nextCellSlicePrim_cpp(NumericVector cell, IntegerVector dim, IntegerVector sliceIndic) {
        typedef SEXP(*Ptr_nextCellSlicePrim_cpp)(SEXP,SEXP,SEXP);
        static Ptr_nextCellSlicePrim_cpp p_nextCellSlicePrim_cpp = NULL;
        if (p_nextCellSlicePrim_cpp == NULL) {
            validateSignature("NumericVector(*nextCellSlicePrim_cpp)(NumericVector,IntegerVector,IntegerVector)");
            p_nextCellSlicePrim_cpp = (Ptr_nextCellSlicePrim_cpp)R_GetCCallable("gRbase", "gRbase_nextCellSlicePrim_cpp");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_nextCellSlicePrim_cpp(Rcpp::wrap(cell), Rcpp::wrap(dim), Rcpp::wrap(sliceIndic));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<NumericVector >(rcpp_result_gen);
    }

    inline NumericVector nextCellSlice_cpp(NumericVector cell, IntegerVector dim, IntegerVector sliceSet) {
        typedef SEXP(*Ptr_nextCellSlice_cpp)(SEXP,SEXP,SEXP);
        static Ptr_nextCellSlice_cpp p_nextCellSlice_cpp = NULL;
        if (p_nextCellSlice_cpp == NULL) {
            validateSignature("NumericVector(*nextCellSlice_cpp)(NumericVector,IntegerVector,IntegerVector)");
            p_nextCellSlice_cpp = (Ptr_nextCellSlice_cpp)R_GetCCallable("gRbase", "gRbase_nextCellSlice_cpp");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_nextCellSlice_cpp(Rcpp::wrap(cell), Rcpp::wrap(dim), Rcpp::wrap(sliceSet));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<NumericVector >(rcpp_result_gen);
    }

    inline IntegerVector slice2entry_cpp(IntegerVector sliceCell, IntegerVector sliceSet, IntegerVector dim) {
        typedef SEXP(*Ptr_slice2entry_cpp)(SEXP,SEXP,SEXP);
        static Ptr_slice2entry_cpp p_slice2entry_cpp = NULL;
        if (p_slice2entry_cpp == NULL) {
            validateSignature("IntegerVector(*slice2entry_cpp)(IntegerVector,IntegerVector,IntegerVector)");
            p_slice2entry_cpp = (Ptr_slice2entry_cpp)R_GetCCallable("gRbase", "gRbase_slice2entry_cpp");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_slice2entry_cpp(Rcpp::wrap(sliceCell), Rcpp::wrap(sliceSet), Rcpp::wrap(dim));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<IntegerVector >(rcpp_result_gen);
    }

    inline int getCellNumberPrim_cpp(NumericVector cell, IntegerVector perm, IntegerVector pvec) {
        typedef SEXP(*Ptr_getCellNumberPrim_cpp)(SEXP,SEXP,SEXP);
        static Ptr_getCellNumberPrim_cpp p_getCellNumberPrim_cpp = NULL;
        if (p_getCellNumberPrim_cpp == NULL) {
            validateSignature("int(*getCellNumberPrim_cpp)(NumericVector,IntegerVector,IntegerVector)");
            p_getCellNumberPrim_cpp = (Ptr_getCellNumberPrim_cpp)R_GetCCallable("gRbase", "gRbase_getCellNumberPrim_cpp");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_getCellNumberPrim_cpp(Rcpp::wrap(cell), Rcpp::wrap(perm), Rcpp::wrap(pvec));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<int >(rcpp_result_gen);
    }

    inline int getCellNumber_cpp(NumericVector cell, IntegerVector dim, IntegerVector perm) {
        typedef SEXP(*Ptr_getCellNumber_cpp)(SEXP,SEXP,SEXP);
        static Ptr_getCellNumber_cpp p_getCellNumber_cpp = NULL;
        if (p_getCellNumber_cpp == NULL) {
            validateSignature("int(*getCellNumber_cpp)(NumericVector,IntegerVector,IntegerVector)");
            p_getCellNumber_cpp = (Ptr_getCellNumber_cpp)R_GetCCallable("gRbase", "gRbase_getCellNumber_cpp");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_getCellNumber_cpp(Rcpp::wrap(cell), Rcpp::wrap(dim), Rcpp::wrap(perm));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<int >(rcpp_result_gen);
    }

    inline IntegerVector permuteCellEntries_cpp(IntegerVector perm, IntegerVector dim) {
        typedef SEXP(*Ptr_permuteCellEntries_cpp)(SEXP,SEXP);
        static Ptr_permuteCellEntries_cpp p_permuteCellEntries_cpp = NULL;
        if (p_permuteCellEntries_cpp == NULL) {
            validateSignature("IntegerVector(*permuteCellEntries_cpp)(IntegerVector,IntegerVector)");
            p_permuteCellEntries_cpp = (Ptr_permuteCellEntries_cpp)R_GetCCallable("gRbase", "gRbase_permuteCellEntries_cpp");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_permuteCellEntries_cpp(Rcpp::wrap(perm), Rcpp::wrap(dim));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<IntegerVector >(rcpp_result_gen);
    }

    inline SEXP aperm__(const SEXP& tab, const SEXP& perm) {
        typedef SEXP(*Ptr_aperm__)(SEXP,SEXP);
        static Ptr_aperm__ p_aperm__ = NULL;
        if (p_aperm__ == NULL) {
            validateSignature("SEXP(*aperm__)(const SEXP&,const SEXP&)");
            p_aperm__ = (Ptr_aperm__)R_GetCCallable("gRbase", "gRbase_aperm__");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_aperm__(Rcpp::wrap(tab), Rcpp::wrap(perm));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<SEXP >(rcpp_result_gen);
    }

    inline SEXP tabPerm__(const SEXP& tab, const SEXP& perm) {
        typedef SEXP(*Ptr_tabPerm__)(SEXP,SEXP);
        static Ptr_tabPerm__ p_tabPerm__ = NULL;
        if (p_tabPerm__ == NULL) {
            validateSignature("SEXP(*tabPerm__)(const SEXP&,const SEXP&)");
            p_tabPerm__ = (Ptr_tabPerm__)R_GetCCallable("gRbase", "gRbase_tabPerm__");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_tabPerm__(Rcpp::wrap(tab), Rcpp::wrap(perm));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<SEXP >(rcpp_result_gen);
    }

    inline NumericVector tabExpand__(const NumericVector& tab1, const SEXP& tab2) {
        typedef SEXP(*Ptr_tabExpand__)(SEXP,SEXP);
        static Ptr_tabExpand__ p_tabExpand__ = NULL;
        if (p_tabExpand__ == NULL) {
            validateSignature("NumericVector(*tabExpand__)(const NumericVector&,const SEXP&)");
            p_tabExpand__ = (Ptr_tabExpand__)R_GetCCallable("gRbase", "gRbase_tabExpand__");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_tabExpand__(Rcpp::wrap(tab1), Rcpp::wrap(tab2));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<NumericVector >(rcpp_result_gen);
    }

    inline NumericVector tabAlign__(const NumericVector& tab1, const NumericVector& tab2) {
        typedef SEXP(*Ptr_tabAlign__)(SEXP,SEXP);
        static Ptr_tabAlign__ p_tabAlign__ = NULL;
        if (p_tabAlign__ == NULL) {
            validateSignature("NumericVector(*tabAlign__)(const NumericVector&,const NumericVector&)");
            p_tabAlign__ = (Ptr_tabAlign__)R_GetCCallable("gRbase", "gRbase_tabAlign__");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_tabAlign__(Rcpp::wrap(tab1), Rcpp::wrap(tab2));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<NumericVector >(rcpp_result_gen);
    }

    inline SEXP tabMarg__(const SEXP& tab1, const SEXP& marg) {
        typedef SEXP(*Ptr_tabMarg__)(SEXP,SEXP);
        static Ptr_tabMarg__ p_tabMarg__ = NULL;
        if (p_tabMarg__ == NULL) {
            validateSignature("SEXP(*tabMarg__)(const SEXP&,const SEXP&)");
            p_tabMarg__ = (Ptr_tabMarg__)R_GetCCallable("gRbase", "gRbase_tabMarg__");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_tabMarg__(Rcpp::wrap(tab1), Rcpp::wrap(marg));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<SEXP >(rcpp_result_gen);
    }

    inline NumericVector tabMult__(NumericVector tab1, NumericVector tab2) {
        typedef SEXP(*Ptr_tabMult__)(SEXP,SEXP);
        static Ptr_tabMult__ p_tabMult__ = NULL;
        if (p_tabMult__ == NULL) {
            validateSignature("NumericVector(*tabMult__)(NumericVector,NumericVector)");
            p_tabMult__ = (Ptr_tabMult__)R_GetCCallable("gRbase", "gRbase_tabMult__");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_tabMult__(Rcpp::wrap(tab1), Rcpp::wrap(tab2));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<NumericVector >(rcpp_result_gen);
    }

    inline NumericVector tabDiv__(NumericVector tab1, NumericVector tab2) {
        typedef SEXP(*Ptr_tabDiv__)(SEXP,SEXP);
        static Ptr_tabDiv__ p_tabDiv__ = NULL;
        if (p_tabDiv__ == NULL) {
            validateSignature("NumericVector(*tabDiv__)(NumericVector,NumericVector)");
            p_tabDiv__ = (Ptr_tabDiv__)R_GetCCallable("gRbase", "gRbase_tabDiv__");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_tabDiv__(Rcpp::wrap(tab1), Rcpp::wrap(tab2));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<NumericVector >(rcpp_result_gen);
    }

    inline NumericVector tabDiv0__(NumericVector tab1, NumericVector tab2) {
        typedef SEXP(*Ptr_tabDiv0__)(SEXP,SEXP);
        static Ptr_tabDiv0__ p_tabDiv0__ = NULL;
        if (p_tabDiv0__ == NULL) {
            validateSignature("NumericVector(*tabDiv0__)(NumericVector,NumericVector)");
            p_tabDiv0__ = (Ptr_tabDiv0__)R_GetCCallable("gRbase", "gRbase_tabDiv0__");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_tabDiv0__(Rcpp::wrap(tab1), Rcpp::wrap(tab2));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<NumericVector >(rcpp_result_gen);
    }

    inline NumericVector tabAdd__(NumericVector tab1, NumericVector tab2) {
        typedef SEXP(*Ptr_tabAdd__)(SEXP,SEXP);
        static Ptr_tabAdd__ p_tabAdd__ = NULL;
        if (p_tabAdd__ == NULL) {
            validateSignature("NumericVector(*tabAdd__)(NumericVector,NumericVector)");
            p_tabAdd__ = (Ptr_tabAdd__)R_GetCCallable("gRbase", "gRbase_tabAdd__");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_tabAdd__(Rcpp::wrap(tab1), Rcpp::wrap(tab2));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<NumericVector >(rcpp_result_gen);
    }

    inline NumericVector tabSubt__(NumericVector tab1, NumericVector tab2) {
        typedef SEXP(*Ptr_tabSubt__)(SEXP,SEXP);
        static Ptr_tabSubt__ p_tabSubt__ = NULL;
        if (p_tabSubt__ == NULL) {
            validateSignature("NumericVector(*tabSubt__)(NumericVector,NumericVector)");
            p_tabSubt__ = (Ptr_tabSubt__)R_GetCCallable("gRbase", "gRbase_tabSubt__");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_tabSubt__(Rcpp::wrap(tab1), Rcpp::wrap(tab2));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<NumericVector >(rcpp_result_gen);
    }

    inline NumericVector tabOp__(const NumericVector& tab1, const NumericVector& tab2, const char op = '*') {
        typedef SEXP(*Ptr_tabOp__)(SEXP,SEXP,SEXP);
        static Ptr_tabOp__ p_tabOp__ = NULL;
        if (p_tabOp__ == NULL) {
            validateSignature("NumericVector(*tabOp__)(const NumericVector&,const NumericVector&,const char)");
            p_tabOp__ = (Ptr_tabOp__)R_GetCCallable("gRbase", "gRbase_tabOp__");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_tabOp__(Rcpp::wrap(tab1), Rcpp::wrap(tab2), Rcpp::wrap(op));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<NumericVector >(rcpp_result_gen);
    }

    inline bool tabEqual__(NumericVector tab1, NumericVector tab2, double eps = 1e-12) {
        typedef SEXP(*Ptr_tabEqual__)(SEXP,SEXP,SEXP);
        static Ptr_tabEqual__ p_tabEqual__ = NULL;
        if (p_tabEqual__ == NULL) {
            validateSignature("bool(*tabEqual__)(NumericVector,NumericVector,double)");
            p_tabEqual__ = (Ptr_tabEqual__)R_GetCCallable("gRbase", "gRbase_tabEqual__");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_tabEqual__(Rcpp::wrap(tab1), Rcpp::wrap(tab2), Rcpp::wrap(eps));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<bool >(rcpp_result_gen);
    }

    inline NumericVector tabListMult__(const List& lst) {
        typedef SEXP(*Ptr_tabListMult__)(SEXP);
        static Ptr_tabListMult__ p_tabListMult__ = NULL;
        if (p_tabListMult__ == NULL) {
            validateSignature("NumericVector(*tabListMult__)(const List&)");
            p_tabListMult__ = (Ptr_tabListMult__)R_GetCCallable("gRbase", "gRbase_tabListMult__");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_tabListMult__(Rcpp::wrap(lst));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<NumericVector >(rcpp_result_gen);
    }

    inline NumericVector tabListAdd__(const List& lst) {
        typedef SEXP(*Ptr_tabListAdd__)(SEXP);
        static Ptr_tabListAdd__ p_tabListAdd__ = NULL;
        if (p_tabListAdd__ == NULL) {
            validateSignature("NumericVector(*tabListAdd__)(const List&)");
            p_tabListAdd__ = (Ptr_tabListAdd__)R_GetCCallable("gRbase", "gRbase_tabListAdd__");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_tabListAdd__(Rcpp::wrap(lst));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<NumericVector >(rcpp_result_gen);
    }

    inline bool is_subsetof_(CharacterVector x, CharacterVector set) {
        typedef SEXP(*Ptr_is_subsetof_)(SEXP,SEXP);
        static Ptr_is_subsetof_ p_is_subsetof_ = NULL;
        if (p_is_subsetof_ == NULL) {
            validateSignature("bool(*is_subsetof_)(CharacterVector,CharacterVector)");
            p_is_subsetof_ = (Ptr_is_subsetof_)R_GetCCallable("gRbase", "gRbase_is_subsetof_");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_is_subsetof_(Rcpp::wrap(x), Rcpp::wrap(set));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<bool >(rcpp_result_gen);
    }

    inline IntegerVector get_superset_(CharacterVector x, List setlist, bool all = false) {
        typedef SEXP(*Ptr_get_superset_)(SEXP,SEXP,SEXP);
        static Ptr_get_superset_ p_get_superset_ = NULL;
        if (p_get_superset_ == NULL) {
            validateSignature("IntegerVector(*get_superset_)(CharacterVector,List,bool)");
            p_get_superset_ = (Ptr_get_superset_)R_GetCCallable("gRbase", "gRbase_get_superset_");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_get_superset_(Rcpp::wrap(x), Rcpp::wrap(setlist), Rcpp::wrap(all));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<IntegerVector >(rcpp_result_gen);
    }

    inline IntegerVector get_subset_(CharacterVector x, List setlist, bool all = false) {
        typedef SEXP(*Ptr_get_subset_)(SEXP,SEXP,SEXP);
        static Ptr_get_subset_ p_get_subset_ = NULL;
        if (p_get_subset_ == NULL) {
            validateSignature("IntegerVector(*get_subset_)(CharacterVector,List,bool)");
            p_get_subset_ = (Ptr_get_subset_)R_GetCCallable("gRbase", "gRbase_get_subset_");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_get_subset_(Rcpp::wrap(x), Rcpp::wrap(setlist), Rcpp::wrap(all));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<IntegerVector >(rcpp_result_gen);
    }

    inline List allSubsets0__(const IntegerVector& x) {
        typedef SEXP(*Ptr_allSubsets0__)(SEXP);
        static Ptr_allSubsets0__ p_allSubsets0__ = NULL;
        if (p_allSubsets0__ == NULL) {
            validateSignature("List(*allSubsets0__)(const IntegerVector&)");
            p_allSubsets0__ = (Ptr_allSubsets0__)R_GetCCallable("gRbase", "gRbase_allSubsets0__");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_allSubsets0__(Rcpp::wrap(x));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<List >(rcpp_result_gen);
    }

    inline SEXP allSubsets__(SEXP& x) {
        typedef SEXP(*Ptr_allSubsets__)(SEXP);
        static Ptr_allSubsets__ p_allSubsets__ = NULL;
        if (p_allSubsets__ == NULL) {
            validateSignature("SEXP(*allSubsets__)(SEXP&)");
            p_allSubsets__ = (Ptr_allSubsets__)R_GetCCallable("gRbase", "gRbase_allSubsets__");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_allSubsets__(Rcpp::wrap(x));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<SEXP >(rcpp_result_gen);
    }

}

#endif // RCPP_gRbase_RCPPEXPORTS_H_GEN_
