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

#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

// calcPairwiseDist
NumericMatrix calcPairwiseDist(NumericMatrix& centers);
RcppExport SEXP _TreeDimensionTest_calcPairwiseDist(SEXP centersSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< NumericMatrix& >::type centers(centersSEXP);
    rcpp_result_gen = Rcpp::wrap(calcPairwiseDist(centers));
    return rcpp_result_gen;
END_RCPP
}
// calculate_mst
std::vector<std::vector<int>> calculate_mst(NumericMatrix& dist_mat);
RcppExport SEXP _TreeDimensionTest_calculate_mst(SEXP dist_matSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< NumericMatrix& >::type dist_mat(dist_matSEXP);
    rcpp_result_gen = Rcpp::wrap(calculate_mst(dist_mat));
    return rcpp_result_gen;
END_RCPP
}
// get_longest_path_statistic
int get_longest_path_statistic(std::vector<std::vector<int>>& tree);
RcppExport SEXP _TreeDimensionTest_get_longest_path_statistic(SEXP treeSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< std::vector<std::vector<int>>& >::type tree(treeSEXP);
    rcpp_result_gen = Rcpp::wrap(get_longest_path_statistic(tree));
    return rcpp_result_gen;
END_RCPP
}
// tree_dimension
List tree_dimension(std::vector<std::vector<int>>& tree);
RcppExport SEXP _TreeDimensionTest_tree_dimension(SEXP treeSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< std::vector<std::vector<int>>& >::type tree(treeSEXP);
    rcpp_result_gen = Rcpp::wrap(tree_dimension(tree));
    return rcpp_result_gen;
END_RCPP
}
// to_adj_mat
std::vector<std::vector<int>> to_adj_mat(NumericMatrix edges);
RcppExport SEXP _TreeDimensionTest_to_adj_mat(SEXP edgesSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< NumericMatrix >::type edges(edgesSEXP);
    rcpp_result_gen = Rcpp::wrap(to_adj_mat(edges));
    return rcpp_result_gen;
END_RCPP
}
// get_edges
List get_edges(NumericMatrix& mat, String MST);
RcppExport SEXP _TreeDimensionTest_get_edges(SEXP matSEXP, SEXP MSTSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< NumericMatrix& >::type mat(matSEXP);
    Rcpp::traits::input_parameter< String >::type MST(MSTSEXP);
    rcpp_result_gen = Rcpp::wrap(get_edges(mat, MST));
    return rcpp_result_gen;
END_RCPP
}
// getStatistics
List getStatistics(NumericMatrix& mat, int sample_size, String MST, bool returnTree);
RcppExport SEXP _TreeDimensionTest_getStatistics(SEXP matSEXP, SEXP sample_sizeSEXP, SEXP MSTSEXP, SEXP returnTreeSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< NumericMatrix& >::type mat(matSEXP);
    Rcpp::traits::input_parameter< int >::type sample_size(sample_sizeSEXP);
    Rcpp::traits::input_parameter< String >::type MST(MSTSEXP);
    Rcpp::traits::input_parameter< bool >::type returnTree(returnTreeSEXP);
    rcpp_result_gen = Rcpp::wrap(getStatistics(mat, sample_size, MST, returnTree));
    return rcpp_result_gen;
END_RCPP
}
// computeDists
NumericVector computeDists(NumericMatrix& data, int perm, int sample_size, Function g, String MST);
RcppExport SEXP _TreeDimensionTest_computeDists(SEXP dataSEXP, SEXP permSEXP, SEXP sample_sizeSEXP, SEXP gSEXP, SEXP MSTSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< NumericMatrix& >::type data(dataSEXP);
    Rcpp::traits::input_parameter< int >::type perm(permSEXP);
    Rcpp::traits::input_parameter< int >::type sample_size(sample_sizeSEXP);
    Rcpp::traits::input_parameter< Function >::type g(gSEXP);
    Rcpp::traits::input_parameter< String >::type MST(MSTSEXP);
    rcpp_result_gen = Rcpp::wrap(computeDists(data, perm, sample_size, g, MST));
    return rcpp_result_gen;
END_RCPP
}
// minSubtreeCover
List minSubtreeCover(List& tree, NumericVector s, StringVector labels);
RcppExport SEXP _TreeDimensionTest_minSubtreeCover(SEXP treeSEXP, SEXP sSEXP, SEXP labelsSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< List& >::type tree(treeSEXP);
    Rcpp::traits::input_parameter< NumericVector >::type s(sSEXP);
    Rcpp::traits::input_parameter< StringVector >::type labels(labelsSEXP);
    rcpp_result_gen = Rcpp::wrap(minSubtreeCover(tree, s, labels));
    return rcpp_result_gen;
END_RCPP
}

static const R_CallMethodDef CallEntries[] = {
    {"_TreeDimensionTest_calcPairwiseDist", (DL_FUNC) &_TreeDimensionTest_calcPairwiseDist, 1},
    {"_TreeDimensionTest_calculate_mst", (DL_FUNC) &_TreeDimensionTest_calculate_mst, 1},
    {"_TreeDimensionTest_get_longest_path_statistic", (DL_FUNC) &_TreeDimensionTest_get_longest_path_statistic, 1},
    {"_TreeDimensionTest_tree_dimension", (DL_FUNC) &_TreeDimensionTest_tree_dimension, 1},
    {"_TreeDimensionTest_to_adj_mat", (DL_FUNC) &_TreeDimensionTest_to_adj_mat, 1},
    {"_TreeDimensionTest_get_edges", (DL_FUNC) &_TreeDimensionTest_get_edges, 2},
    {"_TreeDimensionTest_getStatistics", (DL_FUNC) &_TreeDimensionTest_getStatistics, 4},
    {"_TreeDimensionTest_computeDists", (DL_FUNC) &_TreeDimensionTest_computeDists, 5},
    {"_TreeDimensionTest_minSubtreeCover", (DL_FUNC) &_TreeDimensionTest_minSubtreeCover, 3},
    {NULL, NULL, 0}
};

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